/*
 * MATLAB Compiler: 3.0
 * Date: Mon Nov 03 13:00:57 2003
 * Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
 * "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
 * "array_indexing:on" "-O" "optimize_conditionals:on" "-m" "-W" "main" "-L"
 * "C" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "DancingMonkeys" 
 */
#include "signal_private_iirchk.h"
#include "libmatlbm.h"
static mxArray * _mxarray0_;
static mxArray * _mxarray1_;
static mxArray * _mxarray2_;
static mxArray * _mxarray3_;

static mxChar _array5_[39] = { 'W', 'n', ' ', 'm', 'u', 's', 't', ' ', 'b', 'e',
                               ' ', 'a', ' ', 'o', 'n', 'e', ' ', 'o', 'r', ' ',
                               't', 'w', 'o', ' ', 'e', 'l', 'e', 'm', 'e', 'n',
                               't', ' ', 'v', 'e', 'c', 't', 'o', 'r', '.' };
static mxArray * _mxarray4_;

static mxChar _array7_[25] = { 'T', 'o', 'o', ' ', 'm', 'a', 'n', 'y', ' ',
                               'i', 'n', 'p', 'u', 't', ' ', 'a', 'r', 'g',
                               'u', 'm', 'e', 'n', 't', 's', '.' };
static mxArray * _mxarray6_;

static mxChar _array9_[1] = { 's' };
static mxArray * _mxarray8_;

static mxChar _array11_[1] = { 'z' };
static mxArray * _mxarray10_;

static mxChar _array13_[38] = { 'A', 'n', 'a', 'l', 'o', 'g', ' ', 'f',
                                'l', 'a', 'g', ' ', 'm', 'u', 's', 't',
                                ' ', 'b', 'e', ' ', 'e', 'i', 't', 'h',
                                'e', 'r', ' ', 0x0027, 'z', 0x0027, ' ',
                                'o', 'r', ' ', 0x0027, 's', 0x0027, '.' };
static mxArray * _mxarray12_;

static mxChar _array15_[60] = { 'T', 'h', 'e', ' ', 'c', 'u', 't', 'o', 'f',
                                'f', ' ', 'f', 'r', 'e', 'q', 'u', 'e', 'n',
                                'c', 'i', 'e', 's', ' ', 'm', 'u', 's', 't',
                                ' ', 'b', 'e', ' ', 'w', 'i', 't', 'h', 'i',
                                'n', ' ', 't', 'h', 'e', ' ', 'i', 'n', 't',
                                'e', 'r', 'v', 'a', 'l', ' ', 'o', 'f', ' ',
                                '(', '0', ',', '1', ')', '.' };
static mxArray * _mxarray14_;

static mxChar _array17_[49] = { 'T', 'h', 'e', ' ', 'c', 'u', 't', 'o', 'f',
                                'f', ' ', 'f', 'r', 'e', 'q', 'u', 'e', 'n',
                                'c', 'i', 'e', 's', ' ', 'm', 'u', 's', 't',
                                ' ', 'b', 'e', ' ', 'g', 'r', 'e', 'a', 't',
                                'e', 'r', ' ', 't', 'h', 'a', 'n', ' ', 'z',
                                'e', 'r', 'o', '.' };
static mxArray * _mxarray16_;

static mxChar _array19_[3] = { 'l', 'o', 'w' };
static mxArray * _mxarray18_;

static mxChar _array21_[8] = { 'b', 'a', 'n', 'd', 'p', 'a', 's', 's' };
static mxArray * _mxarray20_;

static mxChar _array23_[4] = { 'h', 'i', 'g', 'h' };
static mxArray * _mxarray22_;
static mxArray * _mxarray24_;

static mxChar _array26_[4] = { 's', 't', 'o', 'p' };
static mxArray * _mxarray25_;
static mxArray * _mxarray27_;

static mxChar _array29_[75] = { 'O', 'p', 't', 'i', 'o', 'n', ' ', 's', 't',
                                'r', 'i', 'n', 'g', ' ', 'm', 'u', 's', 't',
                                ' ', 'b', 'e', ' ', 'o', 'n', 'e', ' ', 'o',
                                'f', ' ', 0x0027, 'h', 'i', 'g', 'h', 0x0027,
                                ',', ' ', 0x0027, 's', 't', 'o', 'p', 0x0027,
                                ',', ' ', 0x0027, 'l', 'o', 'w', 0x0027, ',',
                                ' ', 0x0027, 'b', 'a', 'n', 'd', 'p', 'a', 's',
                                's', 0x0027, ',', ' ', 0x0027, 'z', 0x0027,
                                ' ', 'o', 'r', ' ', 0x0027, 's', 0x0027, '.' };
static mxArray * _mxarray28_;

static mxChar _array31_[64] = { 'F', 'i', 'l', 't', 'e', 'r', ' ', 't', 'y',
                                'p', 'e', ' ', 'm', 'u', 's', 't', ' ', 'b',
                                'e', ' ', 'o', 'n', 'e', ' ', 'o', 'f', ' ',
                                0x0027, 'h', 'i', 'g', 'h', 0x0027, ',',
                                ' ', 0x0027, 's', 't', 'o', 'p', 0x0027,
                                ',', ' ', 0x0027, 'l', 'o', 'w', 0x0027,
                                ',', ' ', 'o', 'r', ' ', 0x0027, 'b', 'a',
                                'n', 'd', 'p', 'a', 's', 's', 0x0027, '.' };
static mxArray * _mxarray30_;

static mxChar _array33_[52] = { 'F', 'o', 'r', ' ', 't', 'h', 'e', ' ',
                                0x0027, 'l', 'o', 'w', 0x0027, ' ', 'f', 'i',
                                'l', 't', 'e', 'r', ' ', 'o', 'p', 't', 'i',
                                'o', 'n', ',', ' ', 'W', 'n', ' ', 'm', 'u',
                                's', 't', ' ', 'h', 'a', 'v', 'e', ' ', '1',
                                ' ', 'e', 'l', 'e', 'm', 'e', 'n', 't', '.' };
static mxArray * _mxarray32_;

static mxChar _array35_[58] = { 'F', 'o', 'r', ' ', 't', 'h', 'e', ' ',
                                0x0027, 'b', 'a', 'n', 'd', 'p', 'a', 's',
                                's', 0x0027, ' ', 'f', 'i', 'l', 't', 'e',
                                'r', ' ', 'o', 'p', 't', 'i', 'o', 'n', ',',
                                ' ', 'W', 'n', ' ', 'm', 'u', 's', 't', ' ',
                                'h', 'a', 'v', 'e', ' ', '2', ' ', 'e', 'l',
                                'e', 'm', 'e', 'n', 't', 's', '.' };
static mxArray * _mxarray34_;

static mxChar _array37_[53] = { 'F', 'o', 'r', ' ', 't', 'h', 'e', ' ', 0x0027,
                                'h', 'i', 'g', 'h', 0x0027, ' ', 'f', 'i', 'l',
                                't', 'e', 'r', ' ', 'o', 'p', 't', 'i', 'o',
                                'n', ',', ' ', 'W', 'n', ' ', 'm', 'u', 's',
                                't', ' ', 'h', 'a', 'v', 'e', ' ', '1', ' ',
                                'e', 'l', 'e', 'm', 'e', 'n', 't', '.' };
static mxArray * _mxarray36_;

static mxChar _array39_[54] = { 'F', 'o', 'r', ' ', 't', 'h', 'e', ' ', 0x0027,
                                's', 't', 'o', 'p', 0x0027, ' ', 'f', 'i', 'l',
                                't', 'e', 'r', ' ', 'o', 'p', 't', 'i', 'o',
                                'n', ',', ' ', 'W', 'n', ' ', 'm', 'u', 's',
                                't', ' ', 'h', 'a', 'v', 'e', ' ', '2', ' ',
                                'e', 'l', 'e', 'm', 'e', 'n', 't', 's', '.' };
static mxArray * _mxarray38_;

void InitializeModule_signal_private_iirchk(void) {
    _mxarray0_ = mclInitializeCharVector(0, 0, (mxChar *)NULL);
    _mxarray1_ = mclInitializeDouble(0.0);
    _mxarray2_ = mclInitializeDouble(1.0);
    _mxarray3_ = mclInitializeDouble(2.0);
    _mxarray4_ = mclInitializeString(39, _array5_);
    _mxarray6_ = mclInitializeString(25, _array7_);
    _mxarray8_ = mclInitializeString(1, _array9_);
    _mxarray10_ = mclInitializeString(1, _array11_);
    _mxarray12_ = mclInitializeString(38, _array13_);
    _mxarray14_ = mclInitializeString(60, _array15_);
    _mxarray16_ = mclInitializeString(49, _array17_);
    _mxarray18_ = mclInitializeString(3, _array19_);
    _mxarray20_ = mclInitializeString(8, _array21_);
    _mxarray22_ = mclInitializeString(4, _array23_);
    _mxarray24_ = mclInitializeDouble(3.0);
    _mxarray25_ = mclInitializeString(4, _array26_);
    _mxarray27_ = mclInitializeDouble(4.0);
    _mxarray28_ = mclInitializeString(75, _array29_);
    _mxarray30_ = mclInitializeString(64, _array31_);
    _mxarray32_ = mclInitializeString(52, _array33_);
    _mxarray34_ = mclInitializeString(58, _array35_);
    _mxarray36_ = mclInitializeString(53, _array37_);
    _mxarray38_ = mclInitializeString(54, _array39_);
}

void TerminateModule_signal_private_iirchk(void) {
    mxDestroyArray(_mxarray38_);
    mxDestroyArray(_mxarray36_);
    mxDestroyArray(_mxarray34_);
    mxDestroyArray(_mxarray32_);
    mxDestroyArray(_mxarray30_);
    mxDestroyArray(_mxarray28_);
    mxDestroyArray(_mxarray27_);
    mxDestroyArray(_mxarray25_);
    mxDestroyArray(_mxarray24_);
    mxDestroyArray(_mxarray22_);
    mxDestroyArray(_mxarray20_);
    mxDestroyArray(_mxarray18_);
    mxDestroyArray(_mxarray16_);
    mxDestroyArray(_mxarray14_);
    mxDestroyArray(_mxarray12_);
    mxDestroyArray(_mxarray10_);
    mxDestroyArray(_mxarray8_);
    mxDestroyArray(_mxarray6_);
    mxDestroyArray(_mxarray4_);
    mxDestroyArray(_mxarray3_);
    mxDestroyArray(_mxarray2_);
    mxDestroyArray(_mxarray1_);
    mxDestroyArray(_mxarray0_);
}

static mxArray * Msignal_private_iirchk(mxArray * * analog,
                                        mxArray * * errStr,
                                        int nargout_,
                                        mxArray * Wn,
                                        mxArray * varargin);

_mexLocalFunctionTable _local_function_table_signal_private_iirchk
  = { 0, (mexFunctionTableEntry *)NULL };

/*
 * The function "mlfSignal_private_iirchk" contains the normal interface for
 * the "signal/private/iirchk" M-function from file
 * "c:\matlab65\toolbox\signal\signal\private\iirchk.m" (lines 1-114). This
 * function processes any input arguments and passes them to the implementation
 * version of the function, appearing above.
 */
mxArray * mlfSignal_private_iirchk(mxArray * * analog,
                                   mxArray * * errStr,
                                   mxArray * Wn,
                                   ...) {
    mxArray * varargin = NULL;
    int nargout = 1;
    mxArray * btype = NULL;
    mxArray * analog__ = NULL;
    mxArray * errStr__ = NULL;
    mlfVarargin(&varargin, Wn, 0);
    mlfEnterNewContext(2, -2, analog, errStr, Wn, varargin);
    if (analog != NULL) {
        ++nargout;
    }
    if (errStr != NULL) {
        ++nargout;
    }
    btype = Msignal_private_iirchk(&analog__, &errStr__, nargout, Wn, varargin);
    mlfRestorePreviousContext(2, 1, analog, errStr, Wn);
    mxDestroyArray(varargin);
    if (analog != NULL) {
        mclCopyOutputArg(analog, analog__);
    } else {
        mxDestroyArray(analog__);
    }
    if (errStr != NULL) {
        mclCopyOutputArg(errStr, errStr__);
    } else {
        mxDestroyArray(errStr__);
    }
    return mlfReturnValue(btype);
}

/*
 * The function "mlxSignal_private_iirchk" contains the feval interface for the
 * "signal/private/iirchk" M-function from file
 * "c:\matlab65\toolbox\signal\signal\private\iirchk.m" (lines 1-114). The
 * feval function calls the implementation version of signal/private/iirchk
 * through this function. This function processes any input arguments and
 * passes them to the implementation version of the function, appearing above.
 */
void mlxSignal_private_iirchk(int nlhs,
                              mxArray * plhs[],
                              int nrhs,
                              mxArray * prhs[]) {
    mxArray * mprhs[2];
    mxArray * mplhs[3];
    int i;
    if (nlhs > 3) {
        mlfError(
          mxCreateString(
            "Run-time Error: File: signal/private/iirchk Line: 1 Col"
            "umn: 1 The function \"signal/private/iirchk\" was calle"
            "d with more than the declared number of outputs (3)."),
          NULL);
    }
    for (i = 0; i < 3; ++i) {
        mplhs[i] = NULL;
    }
    for (i = 0; i < 1 && i < nrhs; ++i) {
        mprhs[i] = prhs[i];
    }
    for (; i < 1; ++i) {
        mprhs[i] = NULL;
    }
    mlfEnterNewContext(0, 1, mprhs[0]);
    mprhs[1] = NULL;
    mlfAssign(&mprhs[1], mclCreateVararginCell(nrhs - 1, prhs + 1));
    mplhs[0]
      = Msignal_private_iirchk(&mplhs[1], &mplhs[2], nlhs, mprhs[0], mprhs[1]);
    mlfRestorePreviousContext(0, 1, mprhs[0]);
    plhs[0] = mplhs[0];
    for (i = 1; i < 3 && i < nlhs; ++i) {
        plhs[i] = mplhs[i];
    }
    for (; i < 3; ++i) {
        mxDestroyArray(mplhs[i]);
    }
    mxDestroyArray(mprhs[1]);
}

/*
 * The function "Msignal_private_iirchk" is the implementation version of the
 * "signal/private/iirchk" M-function from file
 * "c:\matlab65\toolbox\signal\signal\private\iirchk.m" (lines 1-114). It
 * contains the actual compiled code for that M-function. It is a static
 * function and must only be called from one of the interface functions,
 * appearing below.
 */
/*
 * function [btype,analog,errStr] = iirchk(Wn,varargin)
 */
static mxArray * Msignal_private_iirchk(mxArray * * analog,
                                        mxArray * * errStr,
                                        int nargout_,
                                        mxArray * Wn,
                                        mxArray * varargin) {
    mexLocalFunctionTable save_local_function_table_
      = mclSetCurrentLocalFunctionTable(
          &_local_function_table_signal_private_iirchk);
    int nargin_ = mclNargin(-2, Wn, varargin, NULL);
    mxArray * btype = NULL;
    mclCopyArray(&Wn);
    mclCopyArray(&varargin);
    /*
     * %IIRCHK  Parameter checking for BUTTER, CHEBY1, CHEBY2, and ELLIP.
     * %   [btype,analog,errStr] = iirchk(Wn,varargin) returns the 
     * %   filter type btype (1=lowpass, 2=bandpss, 3=highpass, 4=bandstop)
     * %   and analog flag analog (0=digital, 1=analog) given the edge
     * %   frequency Wn (either a one or two element vector) and the
     * %   optional arguments in varargin.  The variable arguments are 
     * %   either empty, a one element cell, or a two element cell.
     * %
     * %   errStr is empty if no errors are detected; otherwise it contains
     * %   the error message.  If errStr is not empty, btype and analog
     * %   are invalid.
     * 
     * %   Copyright 1988-2002 The MathWorks, Inc.
     * % $Revision: 1.7 $
     * 
     * errStr = '';
     */
    mlfAssign(errStr, _mxarray0_);
    /*
     * 
     * % Define defaults:
     * analog = 0; % 0=digital, 1=analog
     */
    mlfAssign(analog, _mxarray1_);
    /*
     * btype = 1;  % 1=lowpass, 2=bandpss, 3=highpass, 4=bandstop
     */
    mlfAssign(&btype, _mxarray2_);
    /*
     * 
     * if length(Wn)==1
     */
    if (mclLengthInt(mclVa(Wn, "Wn")) == 1) {
        /*
         * btype = 1;  
         */
        mlfAssign(&btype, _mxarray2_);
    /*
     * elseif length(Wn)==2
     */
    } else if (mclLengthInt(mclVa(Wn, "Wn")) == 2) {
        /*
         * btype = 2;
         */
        mlfAssign(&btype, _mxarray3_);
    /*
     * else
     */
    } else {
        /*
         * errStr = 'Wn must be a one or two element vector.';
         */
        mlfAssign(errStr, _mxarray4_);
        /*
         * return
         */
        goto return_;
    /*
     * end
     */
    }
    /*
     * 
     * if length(varargin)>2
     */
    if (mclLengthInt(mclVa(varargin, "varargin")) > 2) {
        /*
         * errStr = 'Too many input arguments.';
         */
        mlfAssign(errStr, _mxarray6_);
        /*
         * return
         */
        goto return_;
    /*
     * end
     */
    }
    /*
     * 
     * % Interpret and strip off trailing 's' or 'z' argument:
     * if length(varargin)>0 
     */
    if (mclLengthInt(mclVa(varargin, "varargin")) > 0) {
        /*
         * switch lower(varargin{end})
         */
        mxArray * v_
          = mclInitialize(
              mclFeval(
                mclValueVarargout(),
                mlxLower,
                mlfIndexRef(
                  mclVa(varargin, "varargin"),
                  "{?}",
                  mlfEnd(mclVa(varargin, "varargin"), _mxarray2_, _mxarray2_)),
                NULL));
        if (mclSwitchCompare(v_, _mxarray8_)) {
            /*
             * case 's'
             * analog = 1;
             */
            mlfAssign(analog, _mxarray2_);
            /*
             * varargin(end) = [];
             */
            mlfIndexDelete(
              &varargin,
              "(?)",
              mlfEnd(mclVa(varargin, "varargin"), _mxarray2_, _mxarray2_));
        /*
         * case 'z'
         */
        } else if (mclSwitchCompare(v_, _mxarray10_)) {
            /*
             * analog = 0;
             */
            mlfAssign(analog, _mxarray1_);
            /*
             * varargin(end) = [];
             */
            mlfIndexDelete(
              &varargin,
              "(?)",
              mlfEnd(mclVa(varargin, "varargin"), _mxarray2_, _mxarray2_));
        /*
         * otherwise
         */
        } else {
            /*
             * if length(varargin) > 1
             */
            if (mclLengthInt(mclVa(varargin, "varargin")) > 1) {
                /*
                 * errStr = 'Analog flag must be either ''z'' or ''s''.';
                 */
                mlfAssign(errStr, _mxarray12_);
                /*
                 * return
                 */
                mxDestroyArray(v_);
                goto return_;
            /*
             * end
             */
            }
        /*
         * end
         */
        }
        mxDestroyArray(v_);
    /*
     * end
     */
    }
    /*
     * 
     * % Check for correct Wn limits
     * if ~analog
     */
    if (mclNotBool(mclVv(*analog, "analog"))) {
        /*
         * if any(Wn<=0) | any(Wn>=1)
         */
        mxArray * a_
          = mclInitialize(mlfAny(mclLe(mclVa(Wn, "Wn"), _mxarray1_), NULL));
        if (mlfTobool(a_)
            || mlfTobool(
                 mclOr(
                   a_, mlfAny(mclGe(mclVa(Wn, "Wn"), _mxarray2_), NULL)))) {
            mxDestroyArray(a_);
            /*
             * errStr = 'The cutoff frequencies must be within the interval of (0,1).';
             */
            mlfAssign(errStr, _mxarray14_);
            /*
             * return
             */
            goto return_;
        } else {
            mxDestroyArray(a_);
        }
    /*
     * end
     * else
     */
    } else {
        /*
         * if any(Wn<=0)
         */
        if (mlfTobool(mlfAny(mclLe(mclVa(Wn, "Wn"), _mxarray1_), NULL))) {
            /*
             * errStr = 'The cutoff frequencies must be greater than zero.';
             */
            mlfAssign(errStr, _mxarray16_);
            /*
             * return
             */
            goto return_;
        /*
         * end
         */
        }
    /*
     * end
     */
    }
    /*
     * 
     * % At this point, varargin will either be empty, or contain a single
     * % band type flag.
     * 
     * if length(varargin)==1   % Interpret filter type argument:
     */
    if (mclLengthInt(mclVa(varargin, "varargin")) == 1) {
        /*
         * switch lower(varargin{1})
         */
        mxArray * v_
          = mclInitialize(
              mclFeval(
                mclValueVarargout(),
                mlxLower,
                mlfIndexRef(mclVa(varargin, "varargin"), "{?}", _mxarray2_),
                NULL));
        if (mclSwitchCompare(v_, _mxarray18_)) {
            /*
             * case 'low'
             * btype = 1;
             */
            mlfAssign(&btype, _mxarray2_);
        /*
         * case 'bandpass'
         */
        } else if (mclSwitchCompare(v_, _mxarray20_)) {
            /*
             * btype = 2;
             */
            mlfAssign(&btype, _mxarray3_);
        /*
         * case 'high'
         */
        } else if (mclSwitchCompare(v_, _mxarray22_)) {
            /*
             * btype = 3;
             */
            mlfAssign(&btype, _mxarray24_);
        /*
         * case 'stop'
         */
        } else if (mclSwitchCompare(v_, _mxarray25_)) {
            /*
             * btype = 4;
             */
            mlfAssign(&btype, _mxarray27_);
        /*
         * otherwise
         */
        } else {
            /*
             * if nargin == 2
             */
            if (nargin_ == 2) {
                /*
                 * errStr = ['Option string must be one of ''high'', ''stop'',' ...
                 */
                mlfAssign(errStr, _mxarray28_);
            /*
             * ' ''low'', ''bandpass'', ''z'' or ''s''.'];
             * else  % nargin == 3
             */
            } else {
                /*
                 * errStr = ['Filter type must be one of ''high'', ''stop'',' ...
                 */
                mlfAssign(errStr, _mxarray30_);
            /*
             * ' ''low'', or ''bandpass''.'];
             * end
             */
            }
            /*
             * return
             */
            mxDestroyArray(v_);
            goto return_;
        /*
         * end
         */
        }
        mxDestroyArray(v_);
        /*
         * switch btype
         */
        {
            mxArray * v_ = mclInitialize(mclVv(btype, "btype"));
            if (mclSwitchCompare(v_, _mxarray2_)) {
                /*
                 * case 1
                 * if length(Wn)~=1
                 */
                if (mclLengthInt(mclVa(Wn, "Wn")) != 1) {
                    /*
                     * errStr = 'For the ''low'' filter option, Wn must have 1 element.';
                     */
                    mlfAssign(errStr, _mxarray32_);
                /*
                 * return
                 * end
                 */
                }
            /*
             * case 2
             */
            } else if (mclSwitchCompare(v_, _mxarray3_)) {
                /*
                 * if length(Wn)~=2
                 */
                if (mclLengthInt(mclVa(Wn, "Wn")) != 2) {
                    /*
                     * errStr = 'For the ''bandpass'' filter option, Wn must have 2 elements.';
                     */
                    mlfAssign(errStr, _mxarray34_);
                /*
                 * return
                 * end
                 */
                }
            /*
             * case 3
             */
            } else if (mclSwitchCompare(v_, _mxarray24_)) {
                /*
                 * if length(Wn)~=1
                 */
                if (mclLengthInt(mclVa(Wn, "Wn")) != 1) {
                    /*
                     * errStr = 'For the ''high'' filter option, Wn must have 1 element.';
                     */
                    mlfAssign(errStr, _mxarray36_);
                /*
                 * return
                 * end
                 */
                }
            /*
             * case 4
             */
            } else if (mclSwitchCompare(v_, _mxarray27_)) {
                /*
                 * if length(Wn)~=2
                 */
                if (mclLengthInt(mclVa(Wn, "Wn")) != 2) {
                    /*
                     * errStr = 'For the ''stop'' filter option, Wn must have 2 elements.';
                     */
                    mlfAssign(errStr, _mxarray38_);
                /*
                 * return
                 * end
                 */
                }
            /*
             * end
             */
            }
            mxDestroyArray(v_);
        }
    /*
     * end
     */
    }
    /*
     * 
     */
    return_:
    mclValidateOutput(btype, 1, nargout_, "btype", "signal/private/iirchk");
    mclValidateOutput(*analog, 2, nargout_, "analog", "signal/private/iirchk");
    mclValidateOutput(*errStr, 3, nargout_, "errStr", "signal/private/iirchk");
    mxDestroyArray(varargin);
    mxDestroyArray(Wn);
    mclSetCurrentLocalFunctionTable(save_local_function_table_);
    return btype;
}
