function sig_con

% SIG_CON Show the help for the functions in this toolbox.

% This file is automatically generated.  Matthew Simoneau, 09-04-98
% Copyright (c) 1984-98 by The MathWorks, Inc. All Rights Reserved
% $Revision: 1.10 $ $Date: 1998/10/16 23:19:39 $

helpwin('sig_con/Contents');

function Contents
%MATLAB Tour Partial Function Help:  sig_con
%
%Double click on any function for more information
%
%  Signal Processing Toolbox.
%  Version 4.2   (R11) 10-Jul-1998
% 
%  What's new.
%    Readme     - New features, bug fixes, and changes in this version.
% 
%  Filter analysis and implementation.
%    abs        - Magnitude.
%    angle      - Phase angle.
%    conv       - Convolution.
%    fftfilt    - Overlap-add filter implementation.
%    filter     - Filter implementation.
%    filtfilt   - Zero-phase version of filter.
%    filtic     - Determine filter initial conditions.
%    freqs      - Laplace transform frequency response.
%    freqspace  - Frequency spacing for frequency response.
%    freqz      - Z-transform frequency response.
%    grpdelay   - Group delay.
%    impz       - Impulse response (discrete).
%    latcfilt   - Lattice filter implementation.
%    sgolayfilt - Savitzky-Golay filter implementation.
%    sosfilt    - Second-order sections (biquad) filter implementation.
%    unwrap     - Unwrap phase.
%    upfirdn    - Up sample, FIR filter, down sample.
%    zplane     - Discrete pole-zero plot.
% 
%  FIR filter design.
%    convmtx    - Convolution matrix.
%    cremez     - Complex and nonlinear phase equiripple FIR filter design.
%    fir1       - Window based FIR filter design - low, high, band, stop, multi.
%    fir2       - Window based FIR filter design - arbitrary response.
%    fircls     - Constrained Least Squares filter design - arbitrary response.
%    fircls1    - Constrained Least Squares FIR filter design - low and highpass.
%    firls      - FIR filter design - arbitrary response with transition bands.
%    firrcos    - Raised cosine FIR filter design.
%    intfilt    - Interpolation FIR filter design.
%    kaiserord  - Window based filter order selection using Kaiser window.
%    remez      - Parks-McClellan optimal FIR filter design.
%    remezord   - Parks-McClellan filter order selection.
%    sgolay     - Savitzky-Golay FIR smoothing filter design.
% 
%  IIR digital filter design.
%    butter     - Butterworth filter design.
%    cheby1     - Chebyshev type I filter design.
%    cheby2     - Chebyshev type II filter design.
%    ellip      - Elliptic filter design.
%    maxflat    - Generalized Butterworth lowpass filter design.
%    yulewalk   - Yule-Walker filter design.
% 
%  IIR filter order selection.
%    buttord    - Butterworth filter order selection.
%    cheb1ord   - Chebyshev type I filter order selection.
%    cheb2ord   - Chebyshev type II filter order selection.
%    ellipord   - Elliptic filter order selection.
% 
%  Analog lowpass filter prototypes.
%    besselap   - Bessel filter prototype.
%    buttap     - Butterworth filter prototype.
%    cheb1ap    - Chebyshev type I filter prototype (passband ripple).
%    cheb2ap    - Chebyshev type II filter prototype (stopband ripple).
%    ellipap    - Elliptic filter prototype.
% 
%  Frequency translation.
%    lp2bp      - Lowpass to bandpass analog filter transformation.
%    lp2bs      - Lowpass to bandstop analog filter transformation.
%    lp2hp      - Lowpass to highpass analog filter transformation.
%    lp2lp      - Lowpass to lowpass analog filter transformation.
% 
%  Filter discretization.
%    bilinear   - Bilinear transformation with optional prewarping.
%    impinvar   - Impulse invariance analog to digital conversion.
% 
%  Linear system transformations.
%    latc2tf    - Lattice or lattice ladder to transfer function conversion.
%    residuez   - Z-transform partial fraction expansion.
%    sos2ss     - Second-order sections to state-space conversion.
%    sos2tf     - Second-order sections to transfer function conversion.
%    sos2zp     - Second-order sections to zero-pole conversion.
%    ss2sos     - State-space to second-order sections conversion.
%    ss2tf      - State-space to transfer function conversion.
%    ss2zp      - State-space to zero-pole conversion.
%    tf2latc    - Transfer function to lattice or lattice ladder conversion.
%    tf2sos     - Transfer Function to second-order sections conversion.
%    tf2ss      - Transfer function to state-space conversion.
%    tf2zp      - Transfer function to zero-pole conversion.
%    zp2sos     - Zero-pole to second-order sections conversion.
%    zp2ss      - Zero-pole to state-space conversion.
%    zp2tf      - Zero-pole to transfer function conversion.
% 
%  Windows.
%    bartlett   - Bartlett window.
%    blackman   - Blackman window.
%    boxcar     - Rectangular window.
%    chebwin    - Chebyshev window.
%    hamming    - Hamming window.
%    hanning    - Hanning window.
%    kaiser     - Kaiser window.
%    triang     - Triangular window.
% 
%  Transforms.
%    czt        - Chirp-z transform.
%    dct        - Discrete cosine transform.
%    dftmtx     - Discrete Fourier transform matrix.
%    fft        - Fast Fourier transform.
%    fftshift   - Swap vector halves.
%    hilbert    - Hilbert transform.
%    idct       - Inverse discrete cosine transform.
%    ifft       - Inverse fast Fourier transform.
% 
%  Statistical signal processing and spectral analysis.
%    cohere     - Coherence function estimate.
%    corrcoef   - Correlation coefficients.
%    cov        - Covariance matrix.
%    csd        - Cross Spectral Density.
%    pcov       - Power Spectrum estimate via Covariance method.
%    peig       - Power Spectrum estimate via the Eigenvector method.
%    pmcov      - Power Spectrum estimate via the Modified Covariance method.
%    pburg      - Power Spectrum estimate via Burg's method.
%    pmtm       - Power Spectrum estimate via the Thomson multitaper method.
%    pmusic     - Power Spectrum estimate via MUSIC method.
%    pyulear    - Power Spectrum estimate via the Yule-Walker AR Method.
%    pwelch     - Power Spectrum estimate via Welch's method.
%    spectrum   - psd, csd, cohere and tfe combined.
%    tfe        - Transfer function estimate.
%    xcorr      - Cross-correlation function.
%    xcov       - Covariance function.
% 
%  Parametric modeling.
%    arburg     - AR parametric modeling via Burg's method.
%    arcov      - AR parametric modeling via covariance method.
%    armcov     - AR parametric modeling via modified covariance method.
%    aryule     - AR parametric modeling via the Yule-Walker method.
%    ident      - See the System Identification Toolbox.
%    invfreqs   - Analog filter fit to frequency response.
%    invfreqz   - Discrete filter fit to frequency response.
%    prony      - Prony's discrete filter fit to time response.
%    stmcb      - Steiglitz-McBride iteration for ARMA modeling.
% 
%  Linear Prediction.
%    ac2rc      - Autocorrelation sequence to reflection coefficients conversion. 
%    ac2poly    - Autocorrelation sequence to prediction polynomial conversion.
%    is2rc      - Inverse sine parameters to reflection coefficients conversion.
%    lar2rc     - Log area ratios to reflection coefficients conversion.
%    levinson   - Levinson-Durbin recursion.
%    lpc        - Linear Predictive Coefficients using autocorrelation method.
%    lsf2poly   - Line spectral frequencies to prediction polynomial conversion.
%    poly2ac    - Prediction polynomial to autocorrelation sequence conversion. 
%    poly2lsf   - Prediction polynomial to line spectral frequencies conversion.
%    poly2rc    - Prediction polynomial to reflection coefficients conversion.
%    rc2ac      - Reflection coefficients to autocorrelation sequence conversion.
%    rc2is      - Reflection coefficients to inverse sine parameters conversion.
%    rc2lar     - Reflection coefficients to log area ratios conversion.
%    rc2poly    - Reflection coefficients to prediction polynomial conversion.
%    rlevinson  - Reverse Levinson-Durbin recursion.
% 
%  Waveform generation.
%    chirp      - Swept-frequency cosine generator.
%    diric      - Dirichlet (periodic sinc) function.
%    gauspuls   - Gaussian pulse generator.
%    pulstran   - Pulse train generator.
%    rectpuls   - Sampled aperiodic rectangle generator.
%    sawtooth   - Sawtooth function.
%    sinc       - Sinc or sin(pi*x)/(pi*x) function
%    square     - Square wave function.
%    tripuls    - Sampled aperiodic triangle generator.
% 
%  Audio support.
%    auread     - Read NeXT/SUN (".au") sound file.
%    auwrite    - Write NeXT/SUN (".au") sound file.
%    sound      - Play vector as sound.
%    soundsc    - Autoscale and play vector as sound.
%    wavplay    - Play sound using Windows audio output device.
%    wavread    - Read Microsoft WAVE (".wav") sound file.
%    wavrecord  - Record sound using Windows audio input device.
%    wavwrite   - Write Microsoft WAVE (".wav") sound file.
% 
%  Specialized operations.
%    cceps      - Complex cepstrum.
%    decimate   - Resample data at a lower sample rate.
%    deconv     - Deconvolution.
%    demod      - Demodulation for communications simulation.
%    dpss       - Discrete prolate spheroidal sequences (Slepian sequences). 
%    dpssclear  - Remove discrete prolate spheroidal sequences from database.
%    dpssdir    - Discrete prolate spheroidal sequence database directory.
%    dpssload   - Load discrete prolate spheroidal sequences from database.
%    dpsssave   - Save discrete prolate spheroidal sequences in database.
%    interp     - Resample data at a higher sample rate.
%    interp1    - General 1-D interpolation. (MATLAB Toolbox)
%    medfilt1   - 1-Dimensional median filtering.
%    modulate   - Modulation for communications simulation.
%    rceps      - Real cepstrum and minimum phase reconstruction.
%    resample   - Resample sequence with new sampling rate.
%    specgram   - Spectrogram, for speech signals.
%    spline     - Cubic spline interpolation.
%    vco        - Voltage controlled oscillator.
% 
%  Other.
%    besself    - Bessel analog filter design.
%    buffer     - Buffer a signal vector into a matrix of data frames.
%    conv2      - 2-D convolution.
%    cplxpair   - Order vector into complex conjugate pairs.
%    fft2       - 2-D fast Fourier transform.
%    ifft2      - Inverse 2-D fast Fourier transform.
%    polystab   - Polynomial stabilization.
%    seqperiod  - Find minimum-length repeating sequence in a vector.
%    stem       - Plot discrete data sequence.
%    strips     - Strip plot.
%    xcorr2     - 2-D cross-correlation.
% 
%  -------------------------------------------
%
%  Signal Processing Toolbox GUI
% 
%  Graphical User Interface
%    sptool   - A graphical environment for analyzing and manipulating digital
%               signals, filters, and spectra.  It is the starting point for 
%               using the interactive signal processing environment:
% 
%               * Signal Browser  - signal exploration environment
%               * Filter Designer - FIR and IIR digital filter design
%                                   Includes a graphical Pole/Zero Editor
%               * Filter Viewer   - filter characteristics analysis
%               * Spectrum Viewer - power spectral density estimation 
% 
%  MAT files
%    startup - Default session file which is loaded upon starting SPTool.
% 
%  -------------------------------------------
%
%  Signal Processing Toolbox Demonstrations
% 
%  Demos
%    cztdemo    - Chirp-z transform and FFT demonstration.
%    filtdem    - Filtering a Signal slide show.
%    filtdem2   - Bandpass Filter Design slide show.
%    filtdemo   - Interactive Lowpass Filter design demonstration.
%    moddemo    - Modulation/demodulation demonstration.
%    phone      - Spectral Analysis of DTMF.
%    sgolaydemo - Savitzky-Golay filtering demonstration.
%    sigdemo1   - Interactive Discrete Fourier Transform demonstration.
%    sigdemo2   - Interactive Continuous Fourier Transform demonstration.
%    sosdemo    - Second-order sections demonstration.
% 
%  MAT files
%    ptones     - Touch tone phone sounds used by the phone demo.
% 
%  

function Readme
%MATLAB Tour Partial Function Help:  sig_con
%
%  README file for the Signal Processing Toolbox.
%  Version 4.2   (R11) 10-Jul-1998
% 
% 
%  List of changes:
% 
%  NOTE: Items marked with '*' have changed in a way which might affect 
%        your code.
% 
%  FIXES
%  ~~~~~
%     latc2tf
%     tf2latc
%        - Now convert back and forth correctly.
%     pburg
%        - Works correctly in the complex case.
%     sos2zp
%        - Correctly handles delays in filters. For example:
%          sos=[0 1 0 1 2 0]; [z,p,k]=sos2zp(sos); previously returned:
%          z=0, p=[0;-2], k=0; and now returns z=[], p=-2, k=1.
%     xcorr
%        - No longer returns a small imaginary part for the zero lag
%          autocorrelation of complex data. 
%     zp2sos
%        - Correctly handles delays in filters. For example:
%          b=[0 2]; a=[1 1/2]; [z,p,k]=tf2zp(b,a); sos=zp2sos(z,p,k);
%          previously returned: [2.0000 0 0 1.0000 0.5000 0] and now
%          returns: [0 2.0000 0 1.0000 0.5000 0].
%  
% 
%  ENHANCEMENTS
%  ~~~~~~~~~~~~
%     detrend
%          Now ships with MATLAB; in the toolbox/matlab/datafun directory.
%     firrcos
%        - Now allows you to specify either a bandwidth or a roll-off factor.
%        - Now allows the design of either a normal or a square root raised 
%          cosine filter.
%        - Now allows a user setable variable delay of the impulse response.
%        - Now accepts a window parameter in the filter design. 
%     freqz
%        - Has more plotting options. These include choice of frequency
%          units, magnitude or magnitude squared, suppressing the phase plot
%          and others.
%     levinson 
%        - Is now a CMEX function.
%     pburg
%     pmtm
%     pmusic
%     pyulear
%        * When no Fs is specified, will return the psd estimate, Pxx(w), as
%          a function of normalized angular frequency, w=2*pi*f/Fs[rads/samp].
%          If Fs is specified, they will return the psd estimate, Pxx(f)/Fs,
%          as a function of physical frequency, f [Hz]. Fs defaults to 1 Hz.
%          Note that the new functions pcov, pmcov and pwelch also adhere to
%          this spec.
%     poly2rc
%        - Now also returns the zero lag autocorrelation, when called with an
%          optional second input argument, the final prediction error.
%     rc2poly
%        * Now returns a column vector.
%        - Now also returns the final prediction error, when called with an 
%          optional second input argument, the zero lag autocorrelation.
%     sos2ss
%     sos2tf
%     sos2zp
%        - Now allow for a optional second input argument, the gain returned
%          by the functions that convert to SOS (ss2sos, tf2sos and zp2sos).
%     ss2sos
%     zp2sos
%        * Now have an extra output argument corresponding to the gain of the
%          second-order sections structure. Furthermore, an extra input
%          argument can be given to specify the desired scaling of the 
%          structure. Scaling choices are: infinity-norm, 2-norm and none.
% 
%  NEW FUNCTIONS
%  ~~~~~~~~~~~~~
%     ac2poly    
%        - Autocorrelation sequence to prediction polynomial conversion.
%     ac2rc
%        - Autocorrelation sequence to reflection coefficients conversion. 
%     arburg
%        - AR parametric modeling via Burg's method.
%     arcov
%        - AR parametric modeling via covariance method.
%     armcov
%        - AR parametric modeling via modified covariance method.
%     aryule
%        - AR parametric modeling via the Yule-Walker method.
%     buffer
%        - Buffer a signal vector into a matrix of data frames.
%     is2rc
%        - Inverse sine parameters to reflection coefficients conversion.
%     lar2rc
%        - Log area ratios to reflection coefficients conversion.
%     lsf2poly
%        - Line spectral frequencies to prediction polynomial conversion.
%     pcov
%        - Power Spectrum estimate via Covariance method.
%     peig
%        - Power Spectrum estimate via the Eigenvector method.
%     pmcov
%        - Power Spectrum estimate via the Modified Covariance method.
%     poly2ac
%        - Prediction polynomial to autocorrelation sequence conversion.
%     poly2lsf
%        - Prediction polynomial to line spectral frequencies conversion.
%     pwelch
%        - Power Spectrum estimate via the Welch's modified periodogram method.
%     rc2ac
%        - Reflection coefficients to autocorrelation sequence conversion.
%     rc2is
%        - Reflection coefficients to inverse sine parameters conversion.
%     rc2lar
%        - Reflection coefficients to log area ratios conversion.
%     rlevinson
%        - Reverse Levinson-Durbin Recursion.
%     seqperiod
%        - Find minimum-length repeating sequence in a vector.
%     sgolay
%        - Design a Savitzky-Golay smoothing filter.
%     sgolaydemo
%        - Demonstrates Savitzky-Golay filtering.
%     sgolayfilt
%        - Filter a signal with a Savitzky-Golay smoothing filter.
%     sosfilt
%        - Filter a signal using second-order sections (biquad).
%     tf2sos
%        - Transfer Function to second-order sections conversion.
%     wavplay
%        - Play sound using Windows audio output device.
%     wavrecord
%        - Record sound using Windows audio input device.
% 
%  GRAPHICAL USER INTERFACE
%  ~~~~~~~~~~~~~~~~~~~~~~~~
%    SPTOOL          - Now loads a default session upon starting.  Loading a default
%                      session is an option that is set via SPTool's preferences.
%    SIGNAL BROWSER  - Printing with preview is now possible.
%    FILTER DESIGNER - Added a Pole/Zero Editor as a new filter design method.
%    SPECTRUM VIEWER - Added the Covariance Method and the Modified Covariance Method.
%                    * Removed the Maximum Entropy Method (MEM).
%                    * Welch's method now calls PWELCH instead of PSD.  Since PWELCH 
%                      does not provide a detrending option and it scales the PSD
%                      magnitude by 1/Fs, the scale by 1/Fs option has been
%                      removed along with the detrending option.
%                    * The BURG and YULE AR methods now scale the PSD magnitude by 1/Fs.
%                    * The option to specify an autocorrelation matrix to the Yule AR 
%                      method has been removed since it's not part of the Yule AR 
%                      method definition.
%                    - Printing with preview is now possible.

function abs
%MATLAB Tour Partial Function Help:  sig_con
%
% ABS    Absolute value.
%    ABS(X) is the absolute value of the elements of X. When
%    X is complex, ABS(X) is the complex modulus (magnitude) of
%    the elements of X.
% 
%    

function angle
%MATLAB Tour Partial Function Help:  sig_con
%
% ANGLE  Phase angle.
%    ANGLE(H) returns the phase angles, in radians, of a matrix with
%    complex elements.  
% 
%    

function conv
%MATLAB Tour Partial Function Help:  sig_con
%
% CONV Convolution and polynomial multiplication.
%    C = CONV(A, B) convolves vectors A and B.  The resulting
%    vector is length LENGTH(A)+LENGTH(B)-1.
%    If A and B are vectors of polynomial coefficients, convolving
%    them is equivalent to multiplying the two polynomials.
% 
%    

function fftfilt
%MATLAB Tour Partial Function Help:  sig_con
%
% FFTFILT Overlap-add method of FIR filtering using FFT.
%    Y = FFTFILT(B,X) filters X with the FIR filter B using
%    the overlap/add method, using internal parameters (FFT
%    size and block length) which guarantee efficient execution.
%    
%    Y = FFTFILT(B,X,N) allows you to have some control over the
%    internal parameters, by using an FFT of at least N points.
% 
%    If X is a matrix, FFTFILT filters its columns.  If B is a matrix,
%    FFTFILT applies the filter in each column of B to the signal vector X.
%    If B and X are both matrices with the same number of columns, then
%    the i-th column of B is used to filter the i-th column of X.
% 
%    

function filter
%MATLAB Tour Partial Function Help:  sig_con
%
% FILTER One-dimensional digital filter.
%    Y = FILTER(B,A,X) filters the data in vector X with the
%    filter described by vectors A and B to create the filtered
%    data Y.  The filter is a "Direct Form II Transposed"
%    implementation of the standard difference equation:
% 
%    a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
%                          - a(2)*y(n-1) - ... - a(na+1)*y(n-na)
% 
%    If a(1) is not equal to 1, FILTER normalizes the filter
%    coefficients by a(1). 
% 
%    When X is a matrix, FILTER operates on the columns of X.  When X
%    is an N-D array, FILTER operates along the first non-singleton
%    dimension.
% 
%    [Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final
%    conditions, Zi and Zf, of the delays.  Zi is a vector of length
%    MAX(LENGTH(A),LENGTH(B))-1 or an array of such vectors, one for
%    each column of X.
% 
%    FILTER(B,A,X,[],DIM) or FILTER(B,A,X,Zi,DIM) operates along the
%    dimension DIM.
% 
%    

function filtfilt
%MATLAB Tour Partial Function Help:  sig_con
%
% FILTFILT Zero-phase forward and reverse digital filtering.
%    Y = FILTFILT(B, A, X) filters the data in vector X with the filter described
%    by vectors A and B to create the filtered data Y.  The filter is described 
%    by the difference equation:
% 
%      y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
%                       - a(2)*y(n-1) - ... - a(na+1)*y(n-na)
% 
% 
%    After filtering in the forward direction, the filtered sequence is then 
%    reversed and run back through the filter; Y is the time reverse of the 
%    output of the second filtering operation.  The result has precisely zero 
%    phase distortion and magnitude modified by the square of the filter's 
%    magnitude response.  Care is taken to minimize startup and ending 
%    transients by matching initial conditions.
% 
%    The length of the input x must be more than three times
%    the filter order, defined as max(length(b)-1,length(a)-1).
% 
%    Note that FILTFILT should not be used with differentiator and Hilbert FIR
%    filters, since the operation of these filters depends heavily on their
%    phase response.
% 
%    

function filtic
%MATLAB Tour Partial Function Help:  sig_con
%
% FILTIC Make initial conditions for 'filter' function.
%    Z = filtic( B, A, Y, X ) converts past input X and output Y
%    into initial conditions for the state variables Z needed in the
%        TRANSPOSED DIRECT FORM II filter structure.
%    The vectors of past inputs & outputs are stored with more recent
%    values first, i.e.
%           X = [ x[-1] x[-2] x[-3] ... x[-nb] ... ]
%           Y = [ y[-1] y[-2] y[-3] ... y[-na] ... ]
%    where nb = length(B)-1 and na = length(A)-1.  Short input vectors
%    X and Y are zeropadded to length nb and na respectively.  If X
%    or Y are longer than nb or na, the values beyond those lengths
%    are irrelevant to the filter's initial conditions and are ignored.
% 
%    Z = filtic( B, A, Y ) assumes that X = 0 in the past.
% 
%    

function freqs
%MATLAB Tour Partial Function Help:  sig_con
%
% FREQS Laplace-transform (s-domain) frequency response.  
%    H = FREQS(B,A,W) returns the complex frequency response vector H 
%    of the filter B/A:
%                         nb-1      nb-2
%    	         B(s)   b(1)s  +  b(2)s   + ... +  b(nb)
%      H(s) = ---- = --------------------------------
%                         na-1      na-2
%    	         A(s)   a(1)s  +  a(2)s   + ... +  a(na)
% 
%    given the numerator and denominator coefficients in vectors B and A. 
%    The frequency response is evaluated at the points specified in 
%    vector W.  The magnitude and phase can be graphed by calling
%    FREQS(B,A,W) with no output arguments.
% 
%    [H,W] = FREQS(B,A) automatically picks a set of 200 frequencies W on 
%    which the frequency response is computed.  FREQS(B,A,N) picks N 
%    frequencies. 
% 
%    

function freqspace
%MATLAB Tour Partial Function Help:  sig_con
%
% FREQSPACE Frequency spacing for frequency response.
%    FREQSPACE returns the implied frequency range for equally spaced
%    frequency responses.  FREQSPACE is useful when creating desired
%    frequency responses for FSAMP2, FWIND1, and FWIND2 as well as
%    for various 1-D applications.
%    
%    [F1,F2] = FREQSPACE(N) returns the 2-D frequency range vectors
%    F1 and F2 for an N-by-N matrix.
%    [F1,F2] = FREQSPACE([M N]) returns the 2-D frequency range 
%    vectors for an M-by-N matrix.
% 
%    For 2-D vectors and n odd,  F = (-1+1/n:2/n:1-1/n).
%    For 2-D vectors and n even, F = (-1    :2/n:1-2/n).
% 
%    [F1,F2] = FREQSPACE(...,'meshgrid') is equivalent to
%        [F1,F2] = freqspace(...); [F1,F2] = meshgrid(F1,F2);
% 
%    F = FREQSPACE(N) returns the 1-D frequency vector F assuming N
%    equally spaced points around the unit circle.  For 1-D vectors, 
%    F = (0:2/N:1).  F = FREQSPACE(N,'whole') returns all N equally
%    spaced points. In this case, F = (0:2/N:2*(N-1)/N).
% 
%    

function freqz
%MATLAB Tour Partial Function Help:  sig_con
%
% FREQZ Z-transform digital filter frequency response.
%    When N is an integer, [H,W] = FREQZ(B,A,N) returns the N-point frequency
%    vector W in radians and the N-point complex frequency response vector H
%    of the filter B/A:
%                jw              -jw               -jnbw 
%         jw  B(e)   b(1) + b(2)e + .... + b(nb+1)e
%      H(e) = ---- = ----------------------------
%                jw              -jw               -jnaw
%             A(e)   a(1) + a(2)e + .... + a(na+1)e
%    given numerator and denominator coefficients in vectors B and A. The
%    frequency response is evaluated at N points equally spaced around the
%    upper half of the unit circle. If N isn't specified, it defaults to 512.
% 
%    [H,W] = FREQZ(B,A,N,'whole') uses N points around the whole unit circle.
% 
%    H = FREQZ(B,A,W) returns the frequency response at frequencies 
%    designated in vector W, in [radians/sample] (normally between 0 and pi).
% 
%    [H,F] = FREQZ(B,A,N,Fs) and [H,F] = FREQZ(B,A,N,'whole',Fs) given a 
%    sampling freq Fs in Hz return a frequency vector F in Hz.
%    
%    H = FREQZ(B,A,F,Fs) given sampling frequency Fs in Hz returns the 
%    complex frequency response at the frequencies designated in vector F,
%    also in Hz.
% 
%    Alternatively you can specify parameter-value pairs, as follows:
%    FREQZ(B,A,'NFFT',N,'Fs',Fs,...)
%    The complete set of parameter-value pairs is as follows:
%    (These are not case sensitive and partial-matching is acceptable,
%    e.g. 'ph' is acceptable for 'PHASE')
% 
%    Parameter      Argument-Type     Options          Default
%    ---------------------------------------------------------
%    NFFT             Scalar                            512
%    Fs               Scalar                              1
%    FREQVECTOR       Vector                           Not used
%    RANGE            String       'HALF','WHOLE'      'HALF'
%    NORMFREQ         String        'YES','NO'         'YES' ('NO')**
%    FREQUENCY        String   'ANGULAR','LINEAR'   'ANGULAR'('LINEAR')**
%    NORMMAG*         String        'YES','NO'         'NO'       
%    MAGNITUDE*       String  'DB','LINEAR','SQUARED'  'DB'
%    PHASE*           String        'YES','NO'         'YES'
% 
%    Parameters marked with (*) only affect the plotting, not the
%    output arguments.
% 
%    (**) If Fs is specified, the default values are the ones in
%    parenthesis.
% 
%    You can also specify all the arguments as parameter-value
%    pairs, FREQZ('Numerator',B,'Denominator',A,...). If either the
%    numerator or the denominator is not specified, a default value
%    of one will be used.
% 
%    Note that if a frequency vector is specified, the 'NFFT' and
%    'RANGE' parameters are ignored. The frequency response is then
%    calculated over the range of the specified vector, and at as
%    many points as the length of the vector.
% 
%    

function grpdelay
%MATLAB Tour Partial Function Help:  sig_con
%
% GRPDELAY Group delay of a digital filter.
%    [Gd,W] = GRPDELAY(B,A,N) returns length N vectors Gd and W
%    containing the group delay and the frequencies (in radians) at which it 
%    is evaluated. Group delay is -d{angle(w)}/dw.  The frequency
%    response is evaluated at N points equally spaced around the
%    upper half of the unit circle.   When N is a power of two,
%    the computation is done faster using FFTs.  If you don't specify
%    N, it defaults to 512.
% 
%    GRPDELAY(B,A,N,'whole') uses N points around the whole unit circle.  
% 
%    [Gd,F] = GRPDELAY(B,A,N,Fs) and [Gd,F] = GRPDELAY(B,A,N,'whole',Fs)
%    given sampling frequency Fs in Hz return a vector F in Hz.
% 
%    Gd = GRPDELAY(B,A,W) and Gd = GRPDELAY(B,A,F,Fs) return the group delay
%    evaluated at the points in W (in radians) or F (in Hz), where Fs is the
%    sampling frequency in Hz.
% 
%    GRPDELAY(B,A,...) with no output arguments plots the group delay versus
%    normalized frequency (Nyquist == 1) in the current figure window.
% 
%    

function impz
%MATLAB Tour Partial Function Help:  sig_con
%
% IMPZ Impulse response of digital filter
%    [H,T] = IMPZ(B,A) computes the impulse response of the filter B/A 
%    choosing the number of samples for you, and returns the response in 
%    column vector H and a vector of times (or sample intervals) in T 
%    (T = [0 1 2 ...]').
% 
%    [H,T] = IMPZ(B,A,N) computes N samples of the impulse response.
%    If N is a vector of integers, the impulse response is computed
%    only at those integer values (0 is the origin).
% 
%    [H,T] = IMPZ(B,A,N,Fs) computes N samples and scales T so that
%    samples are spaced 1/Fs units apart.  Fs is 1 by default.
% 
%    [H,T] = IMPZ(B,A,[],Fs) chooses the number of samples for you and scales
%    T so that samples are spaced 1/Fs units apart.
% 
%    IMPZ with no output arguments plots the impulse response using
%    STEM(T,H) in the current figure window.
% 
%    

function latcfilt
%MATLAB Tour Partial Function Help:  sig_con
%
% LATCFILT Lattice and lattice-ladder filter implementation.
%    [F,G] = LATCFILT(K,X) filters X with the FIR lattice coefficients
%    in vector K.  F is the forward lattice filter result, and G is the
%    backward filter result.
% 
%    If K and X are vectors, the result is a (signal) vector.
%    Matrix arguments are permitted under the following rules:
%    - If X is a matrix and K is a vector, each column of X is processed
%      through the lattice filter specified by K.
%    - If X is a vector and K is a matrix, each column of K is used to
%      filter X, and a signal matrix is returned.
%    - If X and K are both matrices with the same # of columns, then the
%      i-th column of K is used to filter the i-th column of X.  A
%      signal matrix is returned.
% 
%    [F,G] = LATCFILT(K,V,X) filters X with the IIR lattice
%    coefficients K and ladder coefficients V.  K and V must be
%    vectors, while X may be a signal matrix.
% 
%    [F,G] = LATCFILT(K,1,X) filters X with the IIR all-pole lattice
%    specified by K.  K and X may be vectors or matrices according to
%    the rules given for the FIR lattice.
% 
%    

function sgolayfilt
%MATLAB Tour Partial Function Help:  sig_con
%
% SGOLAYFILT Savitzky-Golay Filtering.
%    SGOLAYFILT(X,K,F) smoothes the signal X using a Savitzky-Golay 
%    (polynomial) smoothing filter.  The polynomial order, K, must
%    be less than the frame size, F, and F must be odd.  The length 
%    of the input X must be >= F.  If X is a matrix, the filtering
%    is done on the columns of X.
% 
%    Note that if the polynomial order K equals F-1, no smoothing
%    will occur.
% 
%    SGOLAYFILT(X,K,F,W) specifies a weighting vector W with length F
%    containing real, positive valued weights employed during the
%    least-squares minimization.
% 
%    

function sosfilt
%MATLAB Tour Partial Function Help:  sig_con
%
% SOSFILT Second order (biquadradic) IIR filtering.
%    SOSFILT(SOS, X) filters the data in vector X with the second-order 
%    section (SOS) filter described by the matrix B.  The coefficients
%    of the SOS matrix must be expressed using an Lx6 second-order 
%    section matrix where L is the number of second-order sections.
%    If X is a matrix, SOSFILT will filter along the columns of X.
% 
%    SOSFILT uses a direct form II implementation to perform the filtering.
% 
%    The SOS matrix should have the following form:
% 
%    SOS = [ b01 b11 b21 a01 a11 a21
%            b02 b12 b22 a02 a12 a22
%            ...
%            b0L b1L b2L a0L a1L a2L ]
% 
%    

function unwrap
%MATLAB Tour Partial Function Help:  sig_con
%
% UNWRAP Unwrap phase angle.
%    UNWRAP(P) unwraps radian phases P by changing absolute 
%    jumps greater than pi to their 2*pi complement. It unwraps 
%    along the first non-singleton dimension of P. P can be a 
%    scalar, vector, matrix, or N-D array.
% 
%    UNWRAP(P,TOL) uses a jump tolerance of TOL rather
%    than the default TOL = pi.
% 
%    UNWRAP(P,[],DIM) unwraps along dimension DIM using the
%    default tolerance. UNWRAP(P,TOL,DIM) uses a jump tolerance
%    of TOL.
% 
%    

function upfirdn
%MATLAB Tour Partial Function Help:  sig_con
%
% UPFIRDN  Upsample, apply a specified FIR filter, and downsample a signal.
%    UPFIRDN(X,H,P,Q) is a cascade of three systems applied to input signal X:
%          (1) Upsampling by P (zero insertion).
%          (2) FIR filtering with the filter specified by the impulse response 
%              given in H.
%          (3) Downsampling by Q (throwing away samples).
%    UPFIRDN uses an efficient polyphase implementation.
% 
%    Usually X and H are vectors, and the output is a (signal) vector. 
%    UPFIRDN permits matrix arguments under the following rules:
%    If X is a matrix and H is a vector, each column of X is filtered through H.
%    If X is a vector and H is a matrix, each column of H is used to filter X.
%    If X and H are both matrices with the same number of columns, then the i-th
%       column of H is used to filter the i-th column of X.
% 
%    Specifically, these rules are carried out as follows.  Note that the length
%    of the output is Ly = ceil( ((Lx-1)*P + Lh)/Q ) where Lx = length(X) and 
%    Lh = length(H). 
% 
%       Input Signal X    Input Filter H    Output Signal Y   Notes
%       -----------------------------------------------------------------
%    1) length Lx vector  length Lh vector  length Ly vector  Usual case.
%    2) Lx-by-Nx matrix   length Lh vector  Ly-by-Nx matrix   Each column of X
%                                                             is filtered by H.
%    3) length Lx vector  Lh-by-Nh matrix   Ly-by-Nh matrix   Each column of H is
%                                                             used to filter X.
%    4) Lx-by-N matrix    Lh-by-N matrix    Ly-by-N matrix    i-th column of H is
%                                                             used to filter i-th
%                                                             column of X.
% 
%    UPFIRDN(X,H,P)  uses Q=1 as the default.
%    UPFIRDN(X,H)    uses P=1 and Q=1 as defaults.
% 
%    For an easy-to-use alternative to UPFIRDN, which does not require you to 
%    supply a filter or compensate for the signal delay introduced by filtering,
%    use RESAMPLE.
% 
%    

function zplane
%MATLAB Tour Partial Function Help:  sig_con
%
% ZPLANE Z-plane zero-pole plot.
%    ZPLANE(Z,P) plots the zeros Z and poles P (in column vectors) with the 
%    unit circle for reference.  Each zero is represented with a 'o' and 
%    each pole with a 'x' on the plot.  Multiple zeros and poles are 
%    indicated by the multiplicity number shown to the upper right of the 
%    zero or pole.  ZPLANE(Z,P) where Z and/or P is a matrix plots the zeros
%    or poles in different columns with different colors.
% 
%    If either argument is a row, ZPLANE finds the roots of the argument
%    with ROOTS.  So, ZPLANE(B,A) where B and A are row vectors containing
%    transfer function polynomial coefficients plots the poles and zeros
%    of B(z)/A(z).  ZPLANE assumes scalars are zeros or poles.
% 
%    [H1,H2,H3]=ZPLANE(Z,P) returns vectors of handles to the lines and 
%    text objects generated.  H1 is a vector of handles to the zeros lines, 
%    H2 is a vector of handles to the poles lines, and H3 is a vector of 
%    handles to the axes / unit circle line and to text objects which are 
%    present when there are multiple zeros or poles.  In case there are no 
%    zeros or no poles, H1 or H2 is set to the empty matrix [].
% 
%    ZPLANE(Z,P,AX) puts the plot into axes AX.
% 
%    

function convmtx
%MATLAB Tour Partial Function Help:  sig_con
%
% CONVMTX Convolution matrix.
%    CONVMTX(C,N) returns the convolution matrix for vector C.
%    If C is a column vector and X is a column vector of length N,
%    then CONVMTX(C,N)*X is the same as CONV(C,X).
%    If R is a row vector and X is a row vector of length N,
%    then X*CONVMTX(R,N) is the same as CONV(R,X).
%    

function cremez
%MATLAB Tour Partial Function Help:  sig_con
%
% CREMEZ Complex and nonlinear phase equiripple FIR filter design.
%   CREMEZ allows arbitrary frequency-domain constraints to be
%   specified for the design of a possibly complex FIR filter.  The 
%   Chebyshev (or minimax) filter error is optimized, producing
%   equiripple FIR filter designs.
% 
%   B=CREMEZ(N,F,'fresp',W) returns a length N+1 FIR filter which
%   has the best approximation to the desired frequency response
%   as returned by function 'fresp'.  The function is called
%   from within CREMEZ using the syntax:
% 
%                     [DH,DW] = fresp(N,F,GF,W);
%   where:
%   N is the filter order.
%   F is the vector of frequency band edges which must appear
%     monotonically between -1 and +1, where 1 is the Nyquist
%     frequency.  The frequency bands span F(k) to F(k+1) for k odd;
%     the intervals  F(k+1) to F(k+2) for k odd are "transition bands"
%     or "don't care" regions during optimization.
%   GF is a vector of grid points which have been linearly interpolated
%     over each specified frequency band by CREMEZ, and determines the
%     frequency grid at which the response function will be evaluated.
%   W is a vector of real, positive weights, one per band, for use
%     during optimization.  W is optional; if not specified, it is set
%     to unity weighting before being passed to 'fresp'.
%   DH and DW are the desired complex frequency response and
%     optimization weight vectors, respectively, evaluated at each
%     frequency in grid GF.
% 
%   Predefined frequency response functions for 'fresp' include:
%        'lowpass'  'bandpass' 'multiband'      'hilbfilt'
%        'highpass' 'bandstop' 'differentiator' 'invsinc'
%   See the help for PRIVATE/LOWPASS, etc., for more information.
% 
%   B=CREMEZ(N,F,{'fresp',P1,P2,...},W) specifies optional arguments
%   P1, P2, etc., to be passed to the response function 'fresp'.
% 
%   B=CREMEZ(N,F,A,W) is a synonym for B=CREMEZ(N,F,{'multiband',A},W),
%   where A is a vector of response amplitudes at each band edge in F.
% 
%   B=CREMEZ(..., SYM) imposes a symmetry constraint on the impulse
%   response of the design, where SYM may be one of the following:
%           'none' - Default if any negative band edge frequencies are
%                    passed, or if 'fresp' does not supply a default.
%           'even' - Impulse response will be real and even.  This is
%                    the default for highpass, lowpass, bandpass,
%                    bandstop, and multiband designs.
%            'odd' - Impulse response will be real and odd.  This is
%                    the default for Hilbert and differentiator designs.
%           'real' - Impose conjugate symmetry on frequency response.
%   Each frequency response function 'fresp' provides a default value
%   for SYM; see help on private/lowpass, etc., for more information.
%   If any SYM option other than 'none' is specified, the band edges
%   should only be specified over positive frequencies; the negative
%   frequency region will be filled in from symmetry.
% 
%   B=CREMEZ(..., 'skip_stage2') disables the second-stage optimization
%   algorithm, which executes only when CREMEZ determines that an
%   optimal solution has not been reached by the standard Remez
%   error-exchange.  Disabling this algorithm may increase the speed of
%   computation, but with a reduction in accuracy.  By default, the
%   second-stage optimization is enabled.
% 
%   B=CREMEZ(..., DEBUG) enables the display of intermediate results
%   during the filter design, where DEBUG may be one of 'trace',
%   'plots', 'both', or 'off'.  By default, DEBUG is set to'off'.
% 
%   B=CREMEZ(...,{LGRID}), where {LGRID} is a one-by-one cell array containing
%   an integer, controls the density of the frequency grid. The frequency grid 
%   size is roughly 2^nextpow2(LGRID*N).  LGRID defaults to 25.
% 
%   Note that any combination of the SYM, DEBUG, 'skip_stage2', and {LGRID}
%   options may be specified.
% 
%   [B,ERR]=CREMEZ(...) returns the maximum ripple height ERR.
% 
%   [B,ERR,RES]=CREMEZ(...) returns a structure RES of optional results
%   computed by CREMEZ, and contains the following fields:
% 
%      RES.fgrid: vector containing the frequency grid used in
%                 the filter design optimization
%        RES.des: desired response on fgrid
%         RES.wt: weights on fgrid
%          RES.H: actual frequency response on the grid
%      RES.error: error at each point on the frequency grid
%      RES.iextr: vector of indices into fgrid of extremal frequencies
%      RES.fextr: vector of extremal frequencies
% 
%   

function fir1
%MATLAB Tour Partial Function Help:  sig_con
%
% FIR1   FIR filter design using the window method.
%    B = FIR1(N,Wn) designs an N'th order lowpass FIR digital filter
%    and returns the filter coefficients in length N+1 vector B.
%    The cut-off frequency Wn must be between 0 < Wn < 1.0, with 1.0 
%    corresponding to half the sample rate.  The filter B is real and
%    has linear phase, i.e., even symmetric coefficients obeying B(k) =
%    B(N+2-k), k = 1,2,...,N+1.
% 
%    If Wn is a two-element vector, Wn = [W1 W2], FIR1 returns an
%    order N bandpass filter with passband  W1 < W < W2.
%    B = FIR1(N,Wn,'high') designs a highpass filter.
%    B = FIR1(N,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
% 
%    If Wn is a multi-element vector, 
%           Wn = [W1 W2 W3 W4 W5 ... WN],
%    FIR1 returns an order N multiband filter with bands
%     0 < W < W1, W1 < W < W2, ..., WN < W < 1.
%    B = FIR1(N,Wn,'DC-1') makes the first band a passband.
%    B = FIR1(N,Wn,'DC-0') makes the first band a stopband.
% 
%    For filters with a passband near Fs/2, e.g., highpass
%    and bandstop filters, N must be even.
%    
%    By default FIR1 uses a Hamming window.  Other available windows,
%    including Boxcar, Hanning, Bartlett, Blackman, Kaiser and Chebwin
%    can be specified with an optional trailing argument.  For example,
%    B = FIR1(N,Wn,kaiser(N+1,4)) uses a Kaiser window with beta=4.
%    B = FIR1(N,Wn,'high',chebwin(N+1,R)) uses a Chebyshev window.
% 
%    By default, the filter is scaled so the center of the first pass band 
%    has magnitude exactly one after windowing. Use a trailing 'noscale' 
%    argument to prevent this scaling, e.g. B = FIR1(N,Wn,'noscale'), 
%    B = FIR1(N,Wn,'high','noscale'), B = FIR1(N,Wn,wind,'noscale').
% 
%    

function fir2
%MATLAB Tour Partial Function Help:  sig_con
%
% FIR2   FIR filter design using the window method - arbitrary filter shape.
%    B = FIR2(N,F,M) designs an N'th order FIR digital filter with the
%    frequency response specified by vectors F and M, and returns the
%    filter coefficients in length N+1 vector B.  Vectors F and M specify
%    the frequency and magnitude breakpoints for the filter such that
%    PLOT(F,M) would show a plot of the desired frequency response.
%    The frequencies in F must be between 0.0 < F < 1.0, with 1.0
%    corresponding to half the sample rate. They must be in increasing
%    order and start with 0.0 and end with 1.0. 
% 
%    The filter B is real, and has linear phase, i.e., even symmetric 
%    coefficients obeying B(k) =  B(N+2-k), k = 1,2,...,N+1.
% 
%    By default FIR2 uses a Hamming window.  Other available windows,
%    including Boxcar, Hanning, Bartlett, Blackman, Kaiser and Chebwin
%    can be specified with an optional trailing argument.  For example,
%    B = FIR2(N,F,M,bartlett(N+1)) uses a Bartlett window.
%    B = FIR2(N,F,M,chebwin(N+1,R)) uses a Chebyshev window.
% 
%    

function fircls
%MATLAB Tour Partial Function Help:  sig_con
%
% FIRCLS  Linear-phase FIR filter design by constrained least-squares.
%    B = FIRCLS(N,F,A,UP,LO) is a length N+1 linear phase FIR filter which 
%    approximates the desired piecewise constant frequency response in F and A
%    subject to the constraints given in UP and LO.  
% 
%    A is a vector describing the piecewise constant desired amplitude of 
%    the frequency response. The length of A is the number of different bands.
%    UP and LO are vectors of the same length of A. They give the upper and 
%    lower bounds for the frequency response in each band.  
%    F is a vector of transition frequencies. These frequencies must
%    be in increasing order, must start with 0.0, and must end with 1.0.
%    The length of F should exceed the length of A by exactly 1. 
% 
%    EXAMPLE 
%       n   = 51;
%       f   = [0 0.4 0.8 1];
%       a = [0 1 0];
%       up  = [ 0.02 1.02  0.01]; 
%       lo  = [-0.02 0.98 -0.01];
%       b   = fircls(n,f,a,up,lo);
% 
%    NOTE
%       By setting LO equal to 0 in the stopbands, a nonnegative frequency 
%       response amplitude can be obtained. Such filters can be spectrally
%       factored to obtain minimum phase filters.
% 
%    MONITORING THE DESIGN
%       For a textual progress report on the iteration, use a trailing 'trace' 
%       argument, e.g. FIRCLS(N,F,A,UP,LO,'trace').  To display plots of 
%       the design iteration, use a trailing 'plots' argument, 
%       FIRCLS(N,F,A,UP,LO,'plots').  For both text and plots, use 'both'.
% 
%    

function fircls1
%MATLAB Tour Partial Function Help:  sig_con
%
% FIRCLS1 Low & high pass FIR filter design by constrained least-squares.
%    B = FIRCLS1(N,WO,DP,DS) is a length N+1 linear-phase lowpass FIR filter
%    with cut-off frequency W0 and maximum band deviations DP and DS. 
%    W0 is between 0 and 1 (1 corresponds to half the sampling frequency),
%    DP is the maximum passband deviation from 1, and DS is the maximum stopband
%    deviation from 0.
%  
%    B = FIRCLS1(N,WO,DP,DS,'high') is a highpass filter (order N must be even).
% 
%    B = FIRCLS1(N,WO,DP,DS,WT) and B = FIRCLS1(N,WO,DP,DS,WT,'high') meets
%    a passband or stopband edge requirement. If WT is in the passband, then 
%    the use of this parameter ensures that |E(WT)| <= DP where E(w) is the 
%    error function. Similarly, if WT is in the stopband, then the use of WT
%    ensures that |E(WT)| <= DS. Note that in the design of very narrow band 
%    filters with small DP and DS, there may not exist a filter of the given 
%    length that meets these specifications. 
% 
%    B = FIRCLS1(N,WO,DP,DS,WP,WS,K) weights the square error in the passband 
%    K times greater than that in the stopband. WP is the passband edge of the 
%    L2 weight function and WS is the stopband edge (WP < W0 < WS).  Use 
%    trailing WT and 'high' arguments to meet a requirement or design a highpass
%    filter as in the case with no weighting function, e.g. 
%       FIRCLS1(N,WO,DP,DS,WP,WS,K,WT,'high'). 
%    In the 'high' pass filter case, you must have WS < W0 < WP.
% 
%    EXAMPLES
%       n = 55;
%       wo = 0.3;
%       dp = 0.02; ds = 0.008;
%       h = fircls1(n,wo,dp,ds);           % no L2 weights
%       wp = 0.28; ws = 0.32;
%       K = 10;
%       h1 = fircls1(n,wo,dp,ds,wp,ws,K);  % L2 weight
% 
%    MONITORING THE DESIGN
%       For a textual progress report on the iteration, use a trailing 'trace' 
%       argument, e.g. FIRCLS1(N,W0,DP,DS,...,'trace').  To display plots of 
%       the design iteration, use a trailing 'plots' argument, 
%       FIRCLS1(N,W0,DP,DS,...,'plots').  For both text and plots, use 'both'.
% 
%    

function firls
%MATLAB Tour Partial Function Help:  sig_con
%
%  FIRLS Linear-phase FIR filter design using least-squares error minimization.
%    B=FIRLS(N,F,A) returns a length N+1 linear phase (real, symmetric
%    coefficients) FIR filter which has the best approximation to the 
%    desired frequency response described by F and A in the least squares 
%    sense. F is a vector of frequency band edges in pairs, in ascending 
%    order between 0 and 1. 1 corresponds to the Nyquist frequency or half
%    the sampling frequency. A is a real vector the same size as F 
%    which specifies the desired amplitude of the frequency response of the
%    resultant filter B. The desired response is the line connecting the
%    points (F(k),A(k)) and (F(k+1),A(k+1)) for odd k; FIRLS treats the 
%    bands between F(k+1) and F(k+2) for odd k as "transition bands" or 
%    "don't care" regions. Thus the desired amplitude is piecewise linear
%    with transition bands.  The integrated squared error is minimized.
% 
%    B=FIRLS(N,F,A,W) uses the weights in W to weight the error. W has one
%    entry per band (so it is half the length of F and A) which tells
%    FIRLS how much emphasis to put on minimizing the integral squared error
%    in each band relative to the other bands.
%    
%    B=FIRLS(N,F,A,'Hilbert') and B=FIRLS(N,F,A,W,'Hilbert') design filters 
%    that have odd symmetry, that is, B(k) = -B(N+2-k) for k = 1, ..., N+1. 
%    A special case is a Hilbert transformer which has an approx. amplitude
%    of 1 across the entire band, e.g. B=FIRLS(30,[.1 .9],[1 1],'Hilbert'). 
% 
%    B=FIRLS(N,F,A,'differentiator') and B=FIRLS(N,F,A,W,'differentiator')
%    also design filters with odd symmetry, but with a special weighting
%    scheme for non-zero amplitude bands. The weight is assumed to be equal 
%    to the inverse of frequency, squared, times the weight W. Thus the 
%    filter has a much better fit at low frequency than at high frequency. 
%    This designs FIR differentiators.
% 
%    

function firrcos
%MATLAB Tour Partial Function Help:  sig_con
%
% FIRRCOS Raised Cosine FIR Filter design.
%    B=FIRRCOS(N,F0,DF,Fs) returns an order N low pass linear phase FIR 
%    filter with a raised cosine transition band.  The filter has cutoff
%    frequency F0, sampling frequency Fs and transition bandwidth DF 
%    (all in Hz).
% 
%    F0 +/- DF/2 must be in the range [0,Fs/2].    
% 
%    The coefficients of B are normalized so that the nominal passband 
%    gain is always equal to one.
% 
%    FIRRCOS(N,F0,DF) uses a default sampling frequency of Fs = 2.
% 
%    B=FIRRCOS(N,F0,R,Fs,'rolloff') interprets the third argument as the
%    rolloff factor instead of as a transition bandwidth.
% 
%    R must be in the range [0,1].
% 
%    B=FIRRCOS(N,F0,DF,Fs,TYPE) or B=FIRRCOS(N,F0,R,Fs,'rolloff',TYPE) 
%    will design a regular FIR raised cosine filter when TYPE is 
%    'normal' or set to an empty matrix. If TYPE is 'sqrt', B is the 
%    square root FIR raised cosine filter.
% 
%    B=FIRRCOS(...,TYPE,DELAY) allows for a variable integer delay to be 
%    specified. When omitted or left empty, DELAY defaults to N/2 or
%    (N+1)/2 depending on whether N is even or odd.
% 
%    DELAY must be an integer in the range [0, N+1]
% 
%    B=FIRRCOS(...,DELAY,WINDOW) applies a length N+1 window to the 
%    designed filter in order to reduce the ripple in the frequency 
%    response. WINDOW must be a N+1 long column vector. If no window
%    is specified a boxcar (rectangular) window is used.
% 
%    WARNING: Care must be exercised when using a window with a delay
%    other than the default.
% 
%    [B,A]=FIRRCOS(...) will always return A = 1.
% 
%    

function intfilt
%MATLAB Tour Partial Function Help:  sig_con
%
% INTFILT Interpolation (and Decimation) FIR Filter Design
%    B = INTFILT(R,L,ALPHA) designs a linear phase FIR filter which, when 
%    used on a sequence interspersed with R-1 consecutive zeros every 
%    R samples, performs ideal bandlimited interpolation using the nearest 
%    2*L non-zero samples and assuming an original bandlimitedness of 
%    ALPHA times the Nyquist frequency.  B is length 2*R*L-1.
% 
%    B = INTFILT(R,N,'Lagrange') designs an FIR filter which performs Nth 
%    order Lagrange polynomial interpolation on a sequence that is inter-
%    spersed with R-1 consecutive zeros every R samples.  B is length 
%    (N+1)*R-1 for N odd and (N+1)*R for N even.  If both N and R are even, 
%    the filter designed is NOT linear phase.
% 
%    Both types of filters are basically lowpass and are meant to be used
%    for interpolation and decimation.
% 
%    

function kaiserord
%MATLAB Tour Partial Function Help:  sig_con
%
% KAISERORD FIR order estimator (lowpass, highpass, bandpass, multiband).
%    [N,Wn,BETA,TYPE] = KAISERORD(F,A,DEV,Fs) is the approximate order N, 
%    normalized frequency band edges Wn, Kaiser window parameter BETA and filter
%    type TYPE to be used by the FIR1 function:
%       B = FIR1(N, Wn, TYPE, kaiser( N+1,BETA ), 'noscale' )
%    The resulting filter will approximately meet the specifications given
%    by the input parameters F, A, and DEV.
%    F is a vector of cutoff frequencies in Hz, in ascending order between 0 and 
%    half the sampling frequency Fs.  A is a vector of 0s and 1s specifying the 
%    desired function's amplitude on the bands defined by F. The length of F is 
%    twice the length of A, minus 2 (it must therefore be even).  The first 
%    frequency band is assumed to start at zero, and the last one always ends 
%    at Fs/2.
%    DEV is a vector of maximum deviations or ripples allowable for each band. 
%    Fs is the sampling frequency (which defaults to 2 if you leave it off).
% 
%    C = KAISERORD(F,A,DEV,Fs,'cell') is a cell-array whose elements are the
%    parameters to FIR1.
% 
%    EXAMPLE
%       Design a lowpass filter with a passband cutoff of 1500Hz, a 
%       stopband cutoff of 2000Hz, passband ripple of 0.01, stopband ripple 
%       of 0.1, and a sampling frequency of 8000Hz:
% 
%       [n,Wn,beta,typ] = kaiserord( [1500 2000], [1 0], [0.01 0.1], 8000 );
%       b = fir1(n, Wn, typ, kaiser(n+1,beta), 'noscale');
%    
%       This is equivalent to
%       c = kaiserord( [1500 2000], [1 0], [0.01 0.1], 8000, 'cell' );
%       b = fir1(c{:});
% 
%    CAUTION 1: The order N is just an estimate. If the filter does not
%    meet the original specifications, a higher order such as N+1, N+2, etc. 
%    will; if the filter exceeds the specs, a slightly lower order one may work.
%    CAUTION 2: Results are inaccurate if cutoff frequencies are near zero
%    frequency or the Nyquist frequency; or if the devs are large (10%).
% 
%    

function remez
%MATLAB Tour Partial Function Help:  sig_con
%
% REMEZ Parks-McClellan optimal equiripple FIR filter design.
%    B=REMEZ(N,F,A) returns a length N+1 linear phase (real, symmetric
%    coefficients) FIR filter which has the best approximation to the 
%    desired frequency response described by F and A in the minimax
%    sense. F is a vector of frequency band edges in pairs, in ascending 
%    order between 0 and 1. 1 corresponds to the Nyquist frequency or half
%    the sampling frequency. A is a real vector the same size as F 
%    which specifies the desired amplitude of the frequency response of the
%    resultant filter B. The desired response is the line connecting the
%    points (F(k),A(k)) and (F(k+1),A(k+1)) for odd k; REMEZ treats the 
%    bands between F(k+1) and F(k+2) for odd k as "transition bands" or 
%    "don't care" regions. Thus the desired amplitude is piecewise linear
%    with transition bands. The maximum error is minimized.
% 
%    B=REMEZ(N,F,A,W) uses the weights in W to weight the error. W has one
%    entry per band (so it is half the length of F and A) which tells
%    REMEZ how much emphasis to put on minimizing the error in each band 
%    relative to the other bands.
%    
%    B=REMEZ(N,F,A,'Hilbert') and B=REMEZ(N,F,A,W,'Hilbert') design filters
%    that have odd symmetry, that is, B(k) = -B(N+2-k) for k = 1, ..., N+1. 
%    A special case is a Hilbert transformer which has an approx. amplitude
%    of 1 across the entire band, e.g. B=REMEZ(30,[.1 .9],[1 1],'Hilbert'). 
% 
%    B=REMEZ(N,F,A,'differentiator') and B=REMEZ(N,F,A,W,'differentiator')
%    also design filters with odd symmetry, but with a special weighting
%    scheme for non-zero amplitude bands. The weight is assumed to be equal 
%    to the inverse of frequency times the weight W. Thus the filter has a 
%    much better fit at low frequency than at high frequency. This designs
%    FIR differentiators.
% 
%    B=REMEZ(...,{LGRID}), where {LGRID} is a one-by-one cell array containing
%    an integer, controls the density of the frequency grid. The frequency grid 
%    size is roughly LGRID*N/2*BW, where BW is the fraction of the total band 
%    interval [0,1] covered by F. LGRID should be no less than its default of 16.
%    Increasing LGRID often results in filters which are more exactly equi-
%    ripple, at the expense of taking longer to compute.
% 
%    [B,ERR]=REMEZ(...) returns the maximum ripple height ERR.
%  
%    [B,ERR,RES]=REMEZ(...) returns a structure RES of optional results
%    computed by REMEZ, and contains the following fields:
%  
%       RES.fgrid: vector containing the frequency grid used in
%                  the filter design optimization
%         RES.des: desired response on fgrid
%          RES.wt: weights on fgrid
%           RES.H: actual frequency response on the grid
%       RES.error: error at each point on the frequency grid (desired - actual)
%       RES.iextr: vector of indices into fgrid of extremal frequencies
%       RES.fextr: vector of extremal frequencies
% 
%    

function remezord
%MATLAB Tour Partial Function Help:  sig_con
%
% REMEZORD  FIR order estimator (lowpass, highpass, bandpass, multiband)
%    [N,Fo,Ao,W] = REMEZORD(F,A,DEV,Fs) finds the approximate order N, 
%    normalized frequency band edges Fo, frequency band magnitudes Ao and 
%    weights W to be used by the REMEZ function as follows:
%        B = REMEZ(N,Fo,Ao,W)
%    The resulting filter will approximately meet the specifications given
%    by the input parameters F, A, and DEV.  F is a vector of cutoff
%    frequencies in Hz, in ascending order between 0 and half the sampling
%    frequency Fs. If you do not specify Fs, it defaults to 2.  A is a vector
%    specifying the desired function's amplitude on the bands defined by F.
%    The length of F is twice the length of A, minus 2 (it must therefore
%    be even).  The first frequency band always starts at zero, and the last
%    always ends at Fs/2.  It is not necessary to add these elements to the 
%    F vector.  DEV is a vector of maximum deviations or ripples allowable 
%    for each band.
% 
%    C = REMEZORD(F,A,DEV,FS,'cell') is a cell-array whose elements are the 
%    parameters to REMEZ.
% 
%    EXAMPLE
%       Design a lowpass filter with a passband cutoff of 1500, a 
%       stopband cutoff of 2000Hz, passband ripple of 0.01, stopband ripple 
%       of 0.1, and a sampling frequency of 8000Hz:
% 
%          [n,fo,mo,w] = remezord( [1500 2000], [1 0], [0.01 0.1], 8000 );
%          b = remez(n,fo,mo,w);
% 
%       This is equivalent to
%          c = remezord( [1500 2000], [1 0], [0.01 0.1], 8000, 'cell');
%          b = remez(c{:});
% 
%    CAUTION 1: The order N is often underestimated. If the filter does not
%    meet the original specifications, a higher order such as N+1 or N+2 will.
%    CAUTION 2: Results are inaccurate if cutoff frequencies are near zero
%    frequency or the Nyquist frequency.
% 
%    

function sgolay
%MATLAB Tour Partial Function Help:  sig_con
%
% SGOLAY Savitzky-Golay Filter Design.
%    B = SGOLAY(K,F) designs a Savitzky-Golay (polynomial) FIR smoothing
%    filter B.  The polynomial order, K, must be less than the frame size,
%    F, and F must be odd.  
% 
%    Note that if the polynomial order K equals F-1, no smoothing
%    will occur.
% 
%    SGOLAY(K,F,W) specifies a weighting vector W with length F
%    containing real, positive valued weights employed during the
%    least-squares minimization.
% 
%    

function butter
%MATLAB Tour Partial Function Help:  sig_con
%
% BUTTER Butterworth digital and analog filter design.
%    [B,A] = BUTTER(N,Wn) designs an Nth order lowpass digital
%    Butterworth filter and returns the filter coefficients in length 
%    N+1 vectors B (numerator) and A (denominator). The coefficients 
%    are listed in descending powers of z. The cut-off frequency 
%    Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to 
%    half the sample rate.
% 
%    If Wn is a two-element vector, Wn = [W1 W2], BUTTER returns an 
%    order 2N bandpass filter with passband  W1 < W < W2.
%    [B,A] = BUTTER(N,Wn,'high') designs a highpass filter.
%    [B,A] = BUTTER(N,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
%    
%    When used with three left-hand arguments, as in
%    [Z,P,K] = BUTTER(...), the zeros and poles are returned in
%    length N column vectors Z and P, and the gain in scalar K. 
% 
%    When used with four left-hand arguments, as in
%    [A,B,C,D] = BUTTER(...), state-space matrices are returned.
% 
%    BUTTER(N,Wn,'s'), BUTTER(N,Wn,'high','s') and BUTTER(N,Wn,'stop','s')
%    design analog Butterworth filters.  In this case, Wn can be bigger
%    than 1.0.
% 
%    

function cheby1
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEBY1 Chebyshev type I digital and analog filter design.
%    [B,A] = CHEBY1(N,R,Wn) designs an Nth order lowpass digital
%    Chebyshev filter with R decibels of ripple in the passband.
%    CHEBY1 returns the filter coefficients in length N+1 vectors 
%    B (numerator) and A (denominator). The cut-off frequency 
%    Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the 
%    sample rate.  Use R=0.5 as a starting point, if you are unsure 
%    about choosing R.
% 
%    If Wn is a two-element vector, Wn = [W1 W2], CHEBY1 returns an 
%    order 2N bandpass filter with passband  W1 < W < W2.
%    [B,A] = CHEBY1(N,R,Wn,'high') designs a highpass filter.
%    [B,A] = CHEBY1(N,R,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
% 
%    When used with three left-hand arguments, as in
%    [Z,P,K] = CHEBY1(...), the zeros and poles are returned in
%    length N column vectors Z and P, and the gain in scalar K. 
% 
%    When used with four left-hand arguments, as in
%    [A,B,C,D] = CHEBY1(...), state-space matrices are returned. 
% 
%    CHEBY1(N,R,Wn,'s'), CHEBY1(N,R,Wn,'high','s') and 
%    CHEBY1(N,R,Wn,'stop','s') design analog Chebyshev Type I filters.  
%    In this case, Wn can be bigger than 1.0.
% 
%    

function cheby2
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEBY2 Chebyshev type II digital and analog filter design.
%    [B,A] = CHEBY2(N,R,Wn) designs an Nth order lowpass digital
%    Chebyshev filter with the stopband ripple R decibels down and
%    stopband edge frequency Wn.  CHEBY2 returns the filter 
%    coefficients in length N+1 vectors B (numerator) and A (denominator).  
%    The cut-off frequency Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding 
%    to half the sample rate.  Use R = 20 as a starting point, 
%    if you are unsure about choosing R.
% 
%    If Wn is a two-element vector, Wn = [W1 W2], CHEBY2 returns an 
%    order 2N bandpass filter with passband  W1 < W < W2.
%    [B,A] = CHEBY2(N,R,Wn,'high') designs a highpass filter.
%    [B,A] = CHEBY2(N,R,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
% 
%    When used with three left-hand arguments, as in
%    [Z,P,K] = CHEBY2(...), the zeros and poles are returned in
%    length N column vectors Z and P, and the gain in scalar K. 
% 
%    When used with four left-hand arguments, as in
%    [A,B,C,D] = CHEBY2(...), state-space matrices are returned.
% 
%    CHEBY2(N,R,Wn,'s'), CHEBY2(N,R,Wn,'high','s') and 
%    CHEBY2(N,R,Wn,'stop','s') design analog Chebyshev Type II filters.  
%    In this case, Wn can be bigger than 1.0.
% 
%    

function ellip
%MATLAB Tour Partial Function Help:  sig_con
%
% ELLIP Elliptic or Cauer digital and analog filter design.
%    [B,A] = ELLIP(N,Rp,Rs,Wn) designs an Nth order lowpass digital
%    elliptic filter with Rp decibels of ripple in the passband and
%    a stopband Rs decibels down.  ELLIP returns the filter
%    coefficients in length N+1 vectors B (numerator) and A (denominator).  
%    The cut-off frequency Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding 
%    to half the sample rate.  Use Rp = 0.5 and Rs = 20 as starting
%    points, if you are unsure about choosing them.
% 
%    If Wn is a two-element vector, Wn = [W1 W2], ELLIP returns an 
%    order 2N bandpass filter with passband  W1 < W < W2.
%    [B,A] = ELLIP(N,Rp,Rs,Wn,'high') designs a highpass filter.
%    [B,A] = ELLIP(N,Rp,Rs,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
% 
%    When used with three left-hand arguments, as in
%    [Z,P,K] = ELLIP(...), the zeros and poles are returned in
%    length N column vectors Z and P, and the gain in scalar K. 
% 
%    When used with four left-hand arguments, as in
%    [A,B,C,D] = ELLIP(...), state-space matrices are returned. 
% 
%    ELLIP(N,Rp,Rs,Wn,'s'), ELLIP(N,Rp,Rs,Wn,'high','s') and 
%    ELLIP(N,Rp,Rs,Wn,'stop','s') design analog elliptic filters.  
%    In this case, Wn can be bigger than 1.0.
% 
%    

function maxflat
%MATLAB Tour Partial Function Help:  sig_con
%
% MAXFLAT  Maximally flat (a.k.a. generalized Butterworth) digital filter design.
%    [B,A] = MAXFLAT(NB,NA,Wn) is a lowpass Butterworth filter with numerator
%    and denominator coefficients B and A of orders NB and NA respectively.
%    Wn is the cut-off frequency at which the filter's magnitude response
%    is equal to 1/sqrt(2) (approx. -3 dB).  Wn must be between 0 and 1, with
%    1 corresponding to half the sample rate of the filter.  When NA=0, the
%    range of Wn is further restricted due to the smoothness of the filter's
%    response.
% 
%    B = MAXFLAT(NB,'sym',Wn) is a symmetric FIR Butterworth filter. NB must be
%    even, and Wn is restricted to a subinterval of [0,1].  The function will 
%    raise an error if you specify Wn outside of this subinterval.
% 
%    [B,A,B1,B2] = MAXFLAT(NB,NA,Wn) and [B,A,B1,B2] = MAXFLAT(NB,'sym',Wn)
%    return two polynomials B1 and B2 whose product is equal to the numerator 
%    polynomial B (i.e., B = CONV(B1,B2)).  B1 contains all the zeros at z=-1, 
%    and B2 contains all the other zeros.
% 
%    EXAMPLES
%       NB = 10; NA = 2; Wn = 0.6;
%       [b,a,b1,b2] = maxflat(NB,NA,Wn);
%       h = maxflat(NB,'sym',Wn);
% 
%    MONITORING THE DESIGN
%       For a textual display of the design table used in the design, use a 
%       trailing 'trace' argument, e.g. MAXFLAT(NB,NA,Wn,'trace').  To display 
%       plots of the filter's magnitude, group delay and zeros and poles, use
%       a trailing 'plots' argument, MAXFLAT(NB,NA,Wn,'plots').  For both text 
%       and plots, use 'both'.
% 
%    

function yulewalk
%MATLAB Tour Partial Function Help:  sig_con
%
% YULEWALK Recursive filter design using a least-squares method.
%    [B,A] = YULEWALK(N,F,M) finds the N-th order recursive filter
%    coefficients B and A such that the filter:
%    	                      -1             -(n-1) 
%    	   B(z)   b(1) + b(2)z + .... + b(n)z
%    	   ---- = ---------------------------
%    	                      -1             -(n-1)
%    	   A(z)    1   + a(1)z + .... + a(n)z
% 
%    matches the magnitude frequency response given by vectors F and M.
%    Vectors F and M specify the frequency and magnitude breakpoints for
%    the filter such that PLOT(F,M) would show a plot of the desired
%    frequency response. The frequencies in F must be between 0.0 and 1.0,
%    with 1.0 corresponding to half the sample rate. They must be in
%    increasing order and start with 0.0 and end with 1.0. 
% 
%    

function buttord
%MATLAB Tour Partial Function Help:  sig_con
%
% BUTTORD Butterworth filter order selection.
%    [N, Wn] = BUTTORD(Wp, Ws, Rp, Rs) returns the order N of the lowest 
%    order digital Butterworth filter that loses no more than Rp dB in 
%    the passband and has at least Rs dB of attenuation in the stopband.  
%    Wp and Ws are the passband and stopband edge frequencies, normalized 
%    from 0 to 1 (where 1 corresponds to pi radians). For example,
%        Lowpass:    Wp = .1,      Ws = .2
%        Highpass:   Wp = .2,      Ws = .1
%        Bandpass:   Wp = [.2 .7], Ws = [.1 .8]
%        Bandstop:   Wp = [.1 .8], Ws = [.2 .7]
%    BUTTORD also returns Wn, the Butterworth natural frequency (or, 
%    the "3 dB frequency") to use with BUTTER to achieve the specifications. 
% 
%    [N, Wn] = BUTTORD(Wp, Ws, Rp, Rs, 's') does the computation for an 
%    analog filter, in which case Wp and Ws are in radians/second.
% 
%    When Rp is chosen as 3 dB, the Wn in BUTTER is equal to Wp in BUTTORD.  
% 
%    

function cheb1ord
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEB1ORD Chebyshev type I filter order selection.
%    [N, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs) returns the order N of the lowest 
%    order digital Chebyshev Type I filter that loses no more than Rp dB 
%    in the passband and has at least Rs dB of attenuation in the stopband.  
%    Wp and Ws are the passband and stopband edge frequencies, normalized 
%    from 0 to 1 (where 1 corresponds to pi radians). For example,
%        Lowpass:    Wp = .1,      Ws = .2
%        Highpass:   Wp = .2,      Ws = .1
%        Bandpass:   Wp = [.1 .8], Ws = [.2 .7]
%        Bandstop:   Wp = [.2 .7], Ws = [.1 .8]
%    CHEB1ORD also returns Wn, the Chebyshev natural frequency to use with 
%    CHEBY1 to achieve the specifications.
% 
%    [N, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs, 's') does the computation for an 
%    analog filter, in which case Wp and Ws are in radians/second.
% 
%    

function cheb2ord
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEB2ORD Chebyshev type II filter order selection.
%    [N, Wn] = CHEB2ORD(Wp, Ws, Rp, Rs) returns the order N of the lowest 
%    order digital Chebyshev Type II filter that loses no more than Rp dB 
%    in the passband and has at least Rs dB of attenuation in the stopband.  
%    Wp and Ws are the passband and stopband edge frequencies, normalized 
%    from 0 to 1 (where 1 corresponds to pi radians). For example,
%        Lowpass:    Wp = .1,      Ws = .2
%        Highpass:   Wp = .2,      Ws = .1
%        Bandpass:   Wp = [.1 .8], Ws = [.2 .7]
%        Bandstop:   Wp = [.2 .7], Ws = [.1 .8]
%    CHEB2ORD also returns Wn, the Chebyshev natural frequency to use with 
%    CHEBY2 to achieve the specifications.
% 
%    [N, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs, 's') does the computation for an 
%    analog filter, in which case Wp and Ws are in radians/second.
% 
%    

function ellipord
%MATLAB Tour Partial Function Help:  sig_con
%
% ELLIPORD Elliptic filter order selection.
%    [N, Wn] = ELLIPORD(Wp, Ws, Rp, Rs) returns the order N of the lowest 
%    order digital elliptic filter that loses no more than Rp dB in the
%    passband and has at least Rs dB of attenuation in the stopband.  
%    Wp and Ws are the passband and stopband edge frequencies, normalized 
%    from 0 to 1 (where 1 corresponds to pi radians). For example,
%        Lowpass:    Wp = .1,      Ws = .2
%        Highpass:   Wp = .2,      Ws = .1
%        Bandpass:   Wp = [.1 .8], Ws = [.2 .7]
%        Bandstop:   Wp = [.2 .7], Ws = [.1 .8]
%    ELLIPORD also returns Wn, the elliptic natural frequency to
%    use with ELLIP to achieve the specifications.
% 
%    [N, Wn] = ELLIPORD(Wp, Ws, Rp, Rs, 's') does the computation for an 
%    analog filter, in which case Wp and Ws are in radians/second.
% 
%    NOTE: If Rs is much much greater than Rp, or Wp and Ws are very close, 
%    the estimated order can be infinite due to limitations of numerical 
%    precision.
%        
%    

function besselap
%MATLAB Tour Partial Function Help:  sig_con
%
% BESSELAP  Bessel analog lowpass filter prototype.
%    [Z,P,K] = BESSELAP(N) returns the zeros, poles, and gain
%    for an N-th order normalized prototype Bessel analog
%    lowpass filter.  The cutoff or 3dB frequency is equal to 1 
%    for N = 1 and decreases as N increases.
% 
%    

function buttap
%MATLAB Tour Partial Function Help:  sig_con
%
% BUTTAP Butterworth analog lowpass filter prototype.
%    [Z,P,K] = BUTTAP(N) returns the zeros, poles, and gain
%    for an N-th order normalized prototype Butterworth analog
%    lowpass filter.  The resulting filter has N poles around
%    the unit circle in the left half plane, and no zeros.
% 
%    

function cheb1ap
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEB1AP Chebyshev type I analog lowpass filter prototype.
%    [Z,P,K] = CHEB1AP(N,Rp) returns the zeros, poles, and gain
%    of an N-th order normalized prototype type I Chebyshev analog
%    lowpass filter with Rp decibels of ripple in the passband.
%    Type I Chebyshev filters are maximally flat in the stopband.
% 
%    

function cheb2ap
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEB2AP Chebyshev type II analog lowpass filter prototype.
%    [Z,P,K] = CHEB2AP(N,Rs) returns the zeros, poles, and gain
%    of an N-th order normalized prototype type II Chebyshev analog
%    lowpass filter with Rs decibels of ripple in the stopband.
%    Type II Chebyshev filters are maximally flat in the passband.
% 
%    

function ellipap
%MATLAB Tour Partial Function Help:  sig_con
%
% ELLIPAP Elliptic analog lowpass filter prototype.
%    [Z,P,K] = ELLIPAP(N,Rp,Rs) returns the zeros, poles, and gain
%    of an N-th order normalized prototype elliptic analog lowpass
%    filter with Rp decibels of ripple in the passband and a
%    stopband Rs decibels down.

function lp2bp
%MATLAB Tour Partial Function Help:  sig_con
%
% LP2BP Lowpass to bandpass analog filter transformation.
%    [NUMT,DENT] = LP2BP(NUM,DEN,Wo,Bw) transforms the lowpass filter
%    prototype NUM(s)/DEN(s) with unity cutoff frequency to a
%    bandpass filter with center frequency Wo and bandwidth Bw.
%    [AT,BT,CT,DT] = LP2BP(A,B,C,D,Wo,Bw) does the same when the
%    filter is described in state-space form.
% 
%    

function lp2bs
%MATLAB Tour Partial Function Help:  sig_con
%
% LP2BS Lowpass to bandstop analog filter transformation.
%    [NUMT,DENT] = LP2BS(NUM,DEN,Wo,Bw) transforms the lowpass filter
%    prototype NUM(s)/DEN(s) with unity cutoff frequency to a
%    bandstop filter with center frequency Wo and bandwidth Bw.
%    [AT,BT,CT,DT] = LP2BS(A,B,C,D,Wo,Bw) does the same when the
%    filter is described in state-space form.
% 
%    

function lp2hp
%MATLAB Tour Partial Function Help:  sig_con
%
% LP2HP Lowpass to highpass analog filter transformation.
%    [NUMT,DENT] = LP2HP(NUM,DEN,Wo) transforms the lowpass filter
%    prototype NUM(s)/DEN(s) with unity cutoff frequency to a
%    highpass filter with cutoff frequency Wo.
%    [AT,BT,CT,DT] = LP2HP(A,B,C,D,Wo) does the same when the
%    filter is described in state-space form.
% 
%    

function lp2lp
%MATLAB Tour Partial Function Help:  sig_con
%
% LP2LP Lowpass to lowpass analog filter transformation.
%    [NUMT,DENT] = LP2LP(NUM,DEN,Wo) transforms the lowpass filter
%    prototype NUM(s)/DEN(s) with unity cutoff frequency of 1 rad/sec 
%    to a lowpass filter with cutoff frequency Wo (rad/sec).
%    [AT,BT,CT,DT] = LP2LP(A,B,C,D,Wo) does the same when the
%    filter is described in state-space form.
% 
%    

function bilinear
%MATLAB Tour Partial Function Help:  sig_con
%
% BILINEAR Bilinear transformation with optional frequency prewarping.
%    [Zd,Pd,Kd] = BILINEAR(Z,P,K,Fs) converts the s-domain transfer
%    function specified by Z, P, and K to a z-transform discrete
%    equivalent obtained from the bilinear transformation:
% 
%       H(z) = H(s) |
%                   | s = 2*Fs*(z-1)/(z+1)
% 
%    where column vectors Z and P specify the zeros and poles, scalar
%    K specifies the gain, and Fs is the sample frequency in Hz.
%    [NUMd,DENd] = BILINEAR(NUM,DEN,Fs), where NUM and DEN are 
%    row vectors containing numerator and denominator transfer
%    function coefficients, NUM(s)/DEN(s), in descending powers of
%    s, transforms to z-transform coefficients NUMd(z)/DENd(z).
%    [Ad,Bd,Cd,Dd] = BILINEAR(A,B,C,D,Fs) is a state-space version.
%    Each of the above three forms of BILINEAR accepts an optional
%    additional input argument that specifies prewarping. For example,
%    [Zd,Pd,Kd] = BILINEAR(Z,P,K,Fs,Fp) applies prewarping before
%    the bilinear transformation so that the frequency responses
%    before and after mapping match exactly at frequency point Fp
%    (match point Fp is specified in Hz).
% 
%    

function impinvar
%MATLAB Tour Partial Function Help:  sig_con
%
% IMPINVAR Impulse invariance method for analog to digital filter conversion.
%    [BZ,AZ] = IMPINVAR(B,A,Fs) creates a digital filter with numerator
%    and denominator coefficients BZ and AZ respectively whose impulse 
%    response is equal to the impulse response of the analog filter with 
%    coefficients B and A sampled at a frequency of Fs Hertz.  The B and A
%    coefficients will be scaled by 1/Fs.
% 
%    If you don't specify Fs, it defaults to 1 Hz.
% 
%    [BZ,AZ] = IMPINVAR(B,A,Fs,TOL) uses the tolerance TOL for grouping 
%    repeated poles together.  Default value is 0.001, i.e., 0.1%.
% 
%    NOTE: the repeated pole case works, but is limited by the
%          ability of the function ROOTS to factor such polynomials.
% 
%    

function latc2tf
%MATLAB Tour Partial Function Help:  sig_con
%
% LATC2TF Lattice filter to transfer function conversion.
%    [NUM,DEN] = LATC2TF(K,V) finds the transfer function numerator
%    NUM and denominator DEN from the IIR lattice coefficients K and
%    ladder coefficients V.
% 
%    [NUM,DEN] = LATC2TF(K,'iir') assumes that K is associated with an
%    all-pole IIR lattice filter.
% 
%    NUM = LATC2TF(K,'fir') and NUM = LATC2TF(K) find the transfer
%    function numerators from the FIR lattice coefficients specified by K.
% 
%    

function residuez
%MATLAB Tour Partial Function Help:  sig_con
%
% RESIDUEZ Z-transform partial-fraction expansion.
%    [R,P,K] = RESIDUEZ(B,A) finds the residues, poles and direct terms 
%    of the partial-fraction expansion of B(z)/A(z),
% 
%       B(z)       r(1)               r(n)
%       ---- = ------------ +...  ------------ + k(1) + k(2)z^(-1) ...
%       A(z)   1-p(1)z^(-1)       1-p(n)z^(-1)
% 
%    B and A are the numerator and denominator polynomial coefficients,
%    respectively, in ascending powers of z^(-1).  R and P are column
%    vectors containing the residues and poles, respectively.  K contains
%    the direct terms in a row vector.  The number of poles is
%       n = length(A)-1 = length(R) = length(P)
%    The direct term coefficient vector is empty if length(B) < length(A);
%    otherwise,
%       length(K) = length(B)-length(A)+1
% 
%    If P(j) = ... = P(j+m-1) is a pole of multiplicity m, then the
%    expansion includes terms of the form
%            R(j)              R(j+1)                      R(j+m-1)
%       -------------- + ------------------   + ... + ------------------
%       1 - P(j)z^(-1)   (1 - P(j)z^(-1))^2           (1 - P(j)z^(-1))^m
% 
%    [B,A] = RESIDUEZ(R,P,K) converts the partial-fraction expansion back 
%    to B/A form.
% 
%    

function sos2ss
%MATLAB Tour Partial Function Help:  sig_con
%
% SOS2SS Second-order sections to state space model conversion.
%    [A,B,C,D]=SOS2SS(SOS,G) returns the state space matrices
%    A, B, C and D of the discrete-time system given by the gain G
%    and the matrix SOS in second-order sections form.
% 
%    SOS is an L by 6 matrix which contains the coefficients of
%    each second-order section in its rows:
%        SOS = [ b01 b11 b21  1 a11 a21 
%                b02 b12 b22  1 a12 a22
%                ...
%                b0L b1L b2L  1 a1L a2L ]
%    The system transfer function is the product of the second-order 
%    transfer functions of the sections times the gain G. If G is not 
%    specified, it defaults to 1. Each row of the SOS matrix describes
%    a 2nd order transfer function as
%        b0k +  b1k z^-1 +  b2k  z^-2
%        ----------------------------
%        1 +  a1k z^-1 +  a2k  z^-2
%    where k is the row index.
% 
%    

function sos2tf
%MATLAB Tour Partial Function Help:  sig_con
%
% SOS2TF 2nd-order sections to transfer function model conversion.
%    [B,A] = SOS2TF(SOS,G) returns the numerator and denominator
%    coefficients B and A of the discrete-time linear system given
%    by the gain G and the matrix SOS in second-order sections form.
% 
%    SOS is an L by 6 matrix which contains the coefficients of each 
%    second-order section in its rows:
%        SOS = [ b01 b11 b21  1 a11 a21 
%                b02 b12 b22  1 a12 a22
%                ...
%                b0L b1L b2L  1 a1L a2L ]
%    The system transfer function is the product of the second-order 
%    transfer functions of the sections times the gain G. If G is not 
%    specified, it defaults to 1. Each row of the SOS matrix describes
%    a 2nd order transfer function as
%        b0k +  b1k z^-1 +  b2k  z^-2
%        ----------------------------
%        1 +  a1k z^-1 +  a2k  z^-2
%    where k is the row index.
% 
%    

function sos2zp
%MATLAB Tour Partial Function Help:  sig_con
%
% SOS2ZP Second-order sections to zero-pole-gain model conversion.
%    [Z,P,K] = SOS2ZP(SOS,G) returns the zeros Z, poles P and gain K
%    of the system given by the gain G and the matrix SOS in
%    second-order sections form. 
% 
%    SOS is an L by 6 matrix which contains the coefficients of each
%    second-order section in its rows:
%        SOS = [ b01 b11 b21  1 a11 a21 
%                b02 b12 b22  1 a12 a22
%                ...
%                b0L b1L b2L  1 a1L a2L ]
%    The system transfer function is the product of the second-order 
%    transfer functions of the sections times the gain G. If G is not 
%    specified, it defaults to 1. Each row of the SOS matrix describes
%    a 2nd order transfer function as
%        b0k +  b1k z^-1 +  b2k  z^-2
%        ----------------------------
%        1 +  a1k z^-1 +  a2k  z^-2
%    where k is the row index.
% 
%    

function ss2sos
%MATLAB Tour Partial Function Help:  sig_con
%
% SS2SOS State-space to second-order sections model conversion.
%    [SOS,G]=SS2SOS(A,B,C,D) finds a matrix SOS in second-order sections
%    form and a gain G which represent the same system as the one with
%    single-input, single-output state space matrices A, B, C, and D. 
%    The zeros and poles of the system A, B, C, D must be in complex
%    conjugate pairs. The system must be stable.
% 
%    [SOS,G] = SS2SOS(A,B,C,D,IU) uses the IUth input of the multi-input,
%    single-output state space matrices A, B, C and D.
%  
%    SOS is an L by 6 matrix with the following structure:
%        SOS = [ b01 b11 b21  1 a11 a21 
%                b02 b12 b22  1 a12 a22
%                ...
%                b0L b1L b2L  1 a1L a2L ]
% 
%    Each row of the SOS matrix describes a 2nd order transfer function:
%                  b0k +  b1k z^-1 +  b2k  z^-2
%        Hk(z) =  ----------------------------
%                   1 +  a1k z^-1 +  a2k  z^-2
%    where k is the row index.
% 
%    G is a scalar which accounts for the overall gain of the system. If
%    G is not specified, the gain is embedded in the first section. 
%    The second order structure thus describes the system H(z) as:
%        H(z) = G*H1(z)*H2(z)*...*HL(z)
% 
%    SS2SOS(A,B,C,D,DIR_FLAG) specifies the ordering of the 2nd order
%    sections. If DIR_FLAG is equal to 'UP', the first row will contain
%    the poles closest to the origin, and the last row will contain the
%    poles closest to the unit circle. If DIR_FLAG is equal to 'DOWN', the
%    sections are ordered in the opposite direction. The zeros are always
%    paired with the poles closest to them. DIR_FLAG defaults to 'UP'.
% 
%    SS2SOS(A,B,C,D,DIR_FLAG,SCALE) specifies the desired scaling of the
%    gain and the numerator coefficients of all 2nd order sections. SCALE
%    can be either 'NONE', 'INF' or 'TWO' which correspond to no scaling,
%    infinity norm scaling and 2-norm scaling respectively. SCALE defaults
%    to 'NONE'. Using infinity-norm scaling in conjunction with 'UP'
%    ordering will minimize the probability of overflow in the realization.
%    On the other hand, using 2-norm scaling in conjunction with 'DOWN' 
%    ordering will minimize the peak roundoff noise.
% 
%    

function ss2tf
%MATLAB Tour Partial Function Help:  sig_con
%
% SS2TF  State-space to transfer function conversion.
%    [NUM,DEN] = SS2TF(A,B,C,D,iu)  calculates the transfer function:
% 
%                NUM(s)          -1
%        H(s) = -------- = C(sI-A) B + D
%                DEN(s)
%    of the system:
%        .
%        x = Ax + Bu
%        y = Cx + Du
% 
%    from the iu'th input.  Vector DEN contains the coefficients of the
%    denominator in descending powers of s.  The numerator coefficients
%    are returned in matrix NUM with as many rows as there are 
%    outputs y.
% 
%    

function ss2zp
%MATLAB Tour Partial Function Help:  sig_con
%
% SS2ZP  State-space to zero-pole conversion.
%    [Z,P,K] = SS2ZP(A,B,C,D,IU)  calculates the transfer function in
%    factored form:
% 
%                 -1           (s-z1)(s-z2)...(s-zn)
%        H(s) = C(sI-A) B + D =  k ---------------------
%                              (s-p1)(s-p2)...(s-pn)
%    of the system:
%        .
%        x = Ax + Bu
%        y = Cx + Du
% 
%    from the single input IU.  The vector P contains the pole 
%    locations of the denominator of the transfer function.  The 
%    numerator zeros are returned in the columns of matrix Z with as 
%    many columns as there are outputs y.  The gains for each numerator
%    transfer function are returned in column vector K.
% 
%    

function tf2latc
%MATLAB Tour Partial Function Help:  sig_con
%
% TF2LATC Transfer function to lattice filter conversion.
%    [K,V] = TF2LATC(NUM,DEN) finds the lattice parameters K and the ladder
%    parameters V for an IIR (ARMA) lattice-ladder filter, normalized by
%    DEN(1).  Note that an error will be generated if any poles of the
%    transfer function lie on the unit circle.
% 
%    K = TF2LATC(1,DEN) finds the lattice parameters K for an IIR
%    all-pole (AR) lattice filter.  [K,V] = TF2LATC(1,DEN) returns
%    a scalar ladder coefficient V.
% 
%    K = TF2LATC(NUM) finds the lattice parameters K for an FIR (MA)
%    lattice filter, normalized by NUM(1).
% 
%    

function tf2sos
%MATLAB Tour Partial Function Help:  sig_con
%
% TF2SOS Transfer Function to Second Order Section conversion.
%    [SOS,G] = TF2SOS(B,A) finds a matrix SOS in second-order sections 
%    form and a gain G which represent the same system H(z) as the one
%    with numerator B and denominator A.  The poles and zeros of H(z)
%    must be in complex conjugate pairs. Because of the scaling done,
%    all poles must be inside the unit circle, i.e, the system must be
%    stable.
% 
%    SOS is an L by 6 matrix with the following structure:
%        SOS = [ b01 b11 b21  1 a11 a21 
%                b02 b12 b22  1 a12 a22
%                ...
%                b0L b1L b2L  1 a1L a2L ]
% 
%    Each row of the SOS matrix describes a 2nd order transfer function:
%                  b0k +  b1k z^-1 +  b2k  z^-2
%        Hk(z) =  ----------------------------
%                   1 +  a1k z^-1 +  a2k  z^-2
%    where k is the row index.
% 
%    G is a scalar which accounts for the overall gain of the system. If
%    G is not specified, the gain is embedded in the first section. 
%    The second order structure thus describes the system H(z) as:
%        H(z) = G*H1(z)*H2(z)*...*HL(z)
% 
%    TF2SOS(B,A,DIR_FLAG) specifies the ordering of the 2nd order
%    sections. If DIR_FLAG is equal to 'UP', the first row will contain
%    the poles closest to the origin, and the last row will contain the
%    poles closest to the unit circle. If DIR_FLAG is equal to 'DOWN', the
%    sections are ordered in the opposite direction. The zeros are always
%    paired with the poles closest to them. DIR_FLAG defaults to 'UP'.
% 
%    TF2SOS(B,A,DIR_FLAG,SCALE) specifies the desired scaling of the gain
%    and the numerator coefficients of all 2nd order sections. SCALE can be
%    either 'NONE', 'INF' or 'TWO' which correspond to no scaling, infinity
%    norm scaling and 2-norm scaling respectively. SCALE defaults to 'NONE'. 
%    Using infinity-norm scaling in conjunction with 'UP' ordering will
%    minimize the probability of overflow in the realization. On the other
%    hand, using 2-norm scaling in conjunction with 'DOWN' ordering will
%    minimize the peak roundoff noise.
% 
%    

function tf2ss
%MATLAB Tour Partial Function Help:  sig_con
%
% TF2SS  Transfer function to state-space conversion.
%    [A,B,C,D] = TF2SS(NUM,DEN)  calculates the state-space 
%    representation:
%        .
%        x = Ax + Bu
%        y = Cx + Du
% 
%    of the system:
%                NUM(s) 
%        H(s) = --------
%                DEN(s)
% 
%    from a single input.  Vector DEN must contain the coefficients of
%    the denominator in descending powers of s.  Matrix NUM must 
%    contain the numerator coefficients with as many rows as there are
%    outputs y.  The A,B,C,D matrices are returned in controller 
%    canonical form.  This calculation also works for discrete systems.
%    To avoid confusion when using this function with discrete systems,
%    always use a numerator polynomial that has been padded with zeros
%    to make it the same length as the denominator.  See the User's
%    guide for more details.
% 
%    

function tf2zp
%MATLAB Tour Partial Function Help:  sig_con
%
% TF2ZP  Transfer function to zero-pole conversion.
%    [Z,P,K] = TF2ZP(NUM,DEN)  finds the zeros, poles, and gains:
% 
%                  (s-z1)(s-z2)...(s-zn)
%        H(s) =  K ---------------------
%                  (s-p1)(s-p2)...(s-pn)
% 
%    from a SIMO transfer function in polynomial form:
% 
%                NUM(s)
%        H(s) = -------- 
%                DEN(s)
% 
%    Vector DEN specifies the coefficients of the denominator in 
%    descending powers of s.  Matrix NUM indicates the numerator 
%    coefficients with as many rows as there are outputs.  The zero
%    locations are returned in the columns of matrix Z, with as many 
%    columns as there are rows in NUM.  The pole locations are returned
%    in column vector P, and the gains for each numerator transfer 
%    function in vector K. 
%    
%    

function zp2sos
%MATLAB Tour Partial Function Help:  sig_con
%
% ZP2SOS Zero-pole-gain to second-order sections model conversion.
%    [SOS,G] = ZP2SOS(Z,P,K) finds a matrix SOS in second-order sections 
%    form and a gain G which represent the same system H(z) as the one
%    with zeros in vector Z, poles in vector P and gain in scalar K.
%    The poles and zeros must be in complex conjugate pairs. Because of
%    the scaling done, all poles must be inside the unit circle, i.e,
%    the system must be stable.
% 
%    SOS is an L by 6 matrix with the following structure:
%        SOS = [ b01 b11 b21  1 a11 a21 
%                b02 b12 b22  1 a12 a22
%                ...
%                b0L b1L b2L  1 a1L a2L ]
% 
%    Each row of the SOS matrix describes a 2nd order transfer function:
%                  b0k +  b1k z^-1 +  b2k  z^-2
%        Hk(z) =  ----------------------------
%                   1 +  a1k z^-1 +  a2k  z^-2
%    where k is the row index.
% 
%    G is a scalar which accounts for the overall gain of the system. If
%    G is not specified, the gain is embedded in the first section. 
%    The second order structure thus describes the system H(z) as:
%        H(z) = G*H1(z)*H2(z)*...*HL(z)
% 
%    ZP2SOS(Z,P,K,DIR_FLAG) specifies the ordering of the 2nd order
%    sections. If DIR_FLAG is equal to 'UP', the first row will contain
%    the poles closest to the origin, and the last row will contain the
%    poles closest to the unit circle. If DIR_FLAG is equal to 'DOWN', the
%    sections are ordered in the opposite direction. The zeros are always
%    paired with the poles closest to them. DIR_FLAG defaults to 'UP'.
% 
%    ZP2SOS(Z,P,K,DIR_FLAG,SCALE) specifies the desired scaling of the gain
%    and the numerator coefficients of all 2nd order sections. SCALE can be
%    either 'NONE', 'INF' or 'TWO' which correspond to no scaling, infinity
%    norm scaling and 2-norm scaling respectively. SCALE defaults to 'NONE'. 
%    Using infinity-norm scaling in conjunction with 'UP' ordering will
%    minimize the probability of overflow in the realization. On the other
%    hand, using 2-norm scaling in conjunction with 'DOWN' ordering will
%    minimize the peak roundoff noise.
% 
%    

function zp2ss
%MATLAB Tour Partial Function Help:  sig_con
%
% ZP2SS  Zero-pole to state-space conversion.
%    [A,B,C,D] = ZP2SS(Z,P,K)  calculates a state-space representation:
%        .
%        x = Ax + Bu
%        y = Cx + Du
% 
%    for a system given a set of pole locations in column vector P,
%    a matrix Z with the zero locations in as many columns as there are
%    outputs, and the gains for each numerator transfer function in
%    vector K.  The A,B,C,D matrices are returned in block diagonal
%    form.
% 
%        This function handles SIMO systems if the Control Toolbox is
%        present and SISO systems if only the Signal Processing Toolbox
%        is installed.
%        
%    

function zp2tf
%MATLAB Tour Partial Function Help:  sig_con
%
% ZP2TF  Zero-pole to transfer function conversion.
%    [NUM,DEN] = ZP2TF(Z,P,K)  forms the transfer function:
% 
%                    NUM(s)
%            H(s) = -------- 
%                    DEN(s)
% 
%    given a set of zero locations in vector Z, a set of pole locations
%    in vector P, and a gain in scalar K.  Vectors NUM and DEN are 
%    returned with numerator and denominator coefficients in descending
%    powers of s.  
% 
%    

function bartlett
%MATLAB Tour Partial Function Help:  sig_con
%
% BARTLETT Bartlett window.
%    W = BARTLETT(N) returns the N-point Bartlett window.
% 
%    

function blackman
%MATLAB Tour Partial Function Help:  sig_con
%
% BLACKMAN Blackman window.
%    W = BLACKMAN(N) returns the N-point symmetric Blackman window
%        in a column vector.
%    W = BLACKMAN(N,SFLAG) generates the N-point Blackman window 
%        using SFLAG window sampling. SFLAG may be either 'symmetric' 
%        or 'periodic'. By default, 'symmetric' window sampling is used. 
% 
%    

function boxcar
%MATLAB Tour Partial Function Help:  sig_con
%
% BOXCAR Boxcar window.
%    W = BOXCAR(N) returns the N-point rectangular window.
% 
%    

function chebwin
%MATLAB Tour Partial Function Help:  sig_con
%
% CHEBWIN Chebyshev window.
%     W = CHEBWIN(N,R) returns the N-point Chebyshev window 
%         with R decibels of ripple.
% 
%    

function hamming
%MATLAB Tour Partial Function Help:  sig_con
%
% HAMMING Hamming window.
%    W = HAMMING(N) returns the N-point symmetric Hamming window 
%        in a column vector. 
%    W = HAMMING(N,SFLAG) generates the N-point Hamming window 
%        using SFLAG window sampling. SFLAG may be either 'symmetric' 
%        or 'periodic'. By default, 'symmetric' window sampling is used. 
% 
%    

function hanning
%MATLAB Tour Partial Function Help:  sig_con
%
% HANNING Hanning window.
%    W = HANNING(N) returns the N-point symmetric Hanning window 
%        in a column vector. 
%    W = HANNING(N,SFLAG) generates the N-point Hanning window 
%        using SFLAG window sampling. SFLAG may be either 'symmetric' 
%        or 'periodic'. By default, 'symmetric' window sampling is used. 
% 
%    

function kaiser
%MATLAB Tour Partial Function Help:  sig_con
%
% KAISER Kaiser window.
%    W = KAISER(N,beta) returns the BETA-valued N-point Kaiser window.
% 
%    

function triang
%MATLAB Tour Partial Function Help:  sig_con
%
% TRIANG Triangular window.
%    W = TRIANG(N) returns the N-point triangular window.
% 
%    

function czt
%MATLAB Tour Partial Function Help:  sig_con
%
% CZT  Chirp z-transform.
%    G = CZT(X, M, W, A) is the M-element z-transform of sequence X,
%    where M, W and A are scalars which specify the contour in the z-plane
%    on which the z-transform is computed.  M is the length of the transform,
%    W is the complex ratio between points on the contour, and A is the
%    complex starting point.  More explicitly, the contour in the z-plane
%    (a spiral or "chirp" contour) is described by
%        z = A * W.^(-(0:M-1))
% 
%    The parameters M, W, and A are optional; their default values are 
%    M = length(X), W = exp(-j*2*pi/M), and A = 1.  These defaults
%    cause CZT to return the z-transform of X at equally spaced points
%    around the unit circle, equivalent to FFT(X).
% 
%    If X is a matrix, the chirp z-transform operation is applied to each
%    column.
% 
%    

function dct
%MATLAB Tour Partial Function Help:  sig_con
%
% DCT  Discrete cosine transform.
% 
%    Y = DCT(X) returns the discrete cosine transform of X.
%    The vector Y is the same size as X and contains the
%    discrete cosine transform coefficients.
% 
%    Y = DCT(X,N) pads or truncates the vector X to length N 
%    before transforming.
% 
%    If X is a matrix, the DCT operation is applied to each
%    column.  This transform can be inverted using IDCT.
% 
%    

function dftmtx
%MATLAB Tour Partial Function Help:  sig_con
%
% DFTMTX Discrete Fourier transform matrix.
%    DFTMTX(N) is the N-by-N complex matrix of values around
%    the unit-circle whose inner product with a column vector
%    of length N yields the discrete Fourier transform of the
%    vector.  DFTMTX(LENGTH(X))*X is the same as FFT(X).
% 
%    The inverse discrete Fourier transform matrix is
%    CONJ(DFTMTX(N))/N.   

function fft
%MATLAB Tour Partial Function Help:  sig_con
%
% FFT Discrete Fourier transform.
%    FFT(X) is the discrete Fourier transform (DFT) of vector X.  If the
%    length of X is a power of two, a fast radix-2 fast-Fourier
%    transform algorithm is used.  If the length of X is not a
%    power of two, a slower non-power-of-two algorithm is employed.
%    For matrices, the FFT operation is applied to each column.
%    For N-D arrays, the FFT operation operates on the first
%    non-singleton dimension.
% 
%    FFT(X,N) is the N-point FFT, padded with zeros if X has less
%    than N points and truncated if it has more.
% 
%    FFT(X,[],DIM) or FFT(X,N,DIM) applies the FFT operation across the
%    dimension DIM.
%    
%    For length N input vector x, the DFT is a length N vector X,
%    with elements
%                     N
%       X(k) =       sum  x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N.
%                    n=1
%    The inverse DFT (computed by IFFT) is given by
%                     N
%       x(n) = (1/N) sum  X(k)*exp( j*2*pi*(k-1)*(n-1)/N), 1 <= n <= N.
%                    k=1
% 
%    The relationship between the DFT and the Fourier coefficients a and b in
%                N/2
%    x(n) = a0 + sum a(k)*cos(2*pi*k*t(n)/(N*dt))+b(k)*sin(2*pi*k*t(n)/(N*dt))
%                k=1
%    is
%       a0 = X(1)/N, a(k) = 2*real(X(k+1))/N, b(k) = -2*imag(X(k+1))/N,
%    where x is a length N discrete signal sampled at times t with spacing dt.
% 
%    

function fftshift
%MATLAB Tour Partial Function Help:  sig_con
%
% FFTSHIFT Shift DC component to center of spectrum.
%    For vectors, FFTSHIFT(X) swaps the left and right halves of
%    X.  For matrices, FFTSHIFT(X) swaps the first and third
%    quadrants and the second and fourth quadrants.  For N-D
%    arrays, FFTSHIFT(X) swaps "half-spaces" of X along each
%    dimension.
% 
%    FFTSHIFT is useful for visualizing the Fourier transform with
%    the DC component in the middle of the spectrum.
% 
%    

function hilbert
%MATLAB Tour Partial Function Help:  sig_con
%
% HILBERT Hilbert transform.
%    HILBERT(X) is the Hilbert transform of the real part
%    of vector X.  The real part of the result is the original
%    real data; the imaginary part is the actual Hilbert
%    transform.  

function idct
%MATLAB Tour Partial Function Help:  sig_con
%
% IDCT Inverse discrete cosine transform.
% 
%    X = IDCT(Y) inverts the DCT transform, returning the
%    original vector if Y was obtained using Y = DCT(X).
% 
%    X = IDCT(Y,N) pads or truncates the vector Y to length N 
%    before transforming.
% 
%    If Y is a matrix, the IDCT operation is applied to
%    each column.
% 
%    

function ifft
%MATLAB Tour Partial Function Help:  sig_con
%
% IFFT Inverse discrete Fourier transform.
%    IFFT(X) is the inverse discrete Fourier transform of X.
% 
%    IFFT(X,N) is the N-point inverse transform.
% 
%    IFFT(X,[],DIM) or IFFT(X,N,DIM) is the inverse discrete Fourier
%    transform of X across the dimension DIM.
% 
%    

function cohere
%MATLAB Tour Partial Function Help:  sig_con
%
% COHERE Coherence function estimate.
%    Cxy = COHERE(X,Y,NFFT,Fs,WINDOW) estimates the coherence of X and Y
%    using Welch's averaged periodogram method.  Coherence is a function
%    of frequency with values between 0 and 1 that indicate how well the
%    input X corresponds to the output Y at each frequency.  X and Y are 
%    divided into overlapping sections, each of which is detrended, then 
%    windowed by the WINDOW parameter, then zero-padded to length NFFT.  
%    The magnitude squared of the length NFFT DFTs of the sections of X and 
%    the sections of Y are averaged to form Pxx and Pyy, the Power Spectral
%    Densities of X and Y respectively. The products of the length NFFT DFTs
%    of the sections of X and Y are averaged to form Pxy, the Cross Spectral
%    Density of X and Y. The coherence Cxy is given by
%        Cxy = (abs(Pxy).^2)./(Pxx.*Pyy)
%    Cxy has length NFFT/2+1 for NFFT even, (NFFT+1)/2 for NFFT odd, or NFFT
%    if X or Y is complex. If you specify a scalar for WINDOW, a Hanning 
%    window of that length is used.  Fs is the sampling frequency which does
%    not effect the cross spectrum estimate but is used for scaling of plots.
% 
%    [Cxy,F] = COHERE(X,Y,NFFT,Fs,WINDOW,NOVERLAP) returns a vector of freq-
%    uencies the same size as Cxy at which the coherence is computed, and 
%    overlaps the sections of X and Y by NOVERLAP samples.
% 
%    COHERE(X,Y,...,DFLAG), where DFLAG can be 'linear', 'mean' or 'none', 
%    specifies a detrending mode for the prewindowed sections of X and Y.
%    DFLAG can take the place of any parameter in the parameter list
%    (besides X and Y) as long as it is last, e.g. COHERE(X,Y,'mean');
%    
%    COHERE with no output arguments plots the coherence in the current 
%    figure window.
% 
%    The default values for the parameters are NFFT = 256 (or LENGTH(X),
%    whichever is smaller), NOVERLAP = 0, WINDOW = HANNING(NFFT), Fs = 2, 
%    P = .95, and DFLAG = 'none'.  You can obtain a default parameter by 
%    leaving it off or inserting an empty matrix [], e.g. 
%    COHERE(X,Y,[],10000).
% 
%    

function corrcoef
%MATLAB Tour Partial Function Help:  sig_con
%
% CORRCOEF Correlation coefficients.
%    CORRCOEF(X) is a matrix of correlation coefficients formed
%    from array X whose each row is an observation, and each
%    column is a variable.
%    CORRCOEF(X,Y), where X and Y are column vectors is the same as
%    CORRCOEF([X Y]).
%    
%    If C is the covariance matrix, C = COV(X), then CORRCOEF(X) is
%    the matrix whose (i,j)'th element is
% 
%           C(i,j)/SQRT(C(i,i)*C(j,j)).
% 
%    

function cov
%MATLAB Tour Partial Function Help:  sig_con
%
% COV Covariance matrix.
%    COV(X), if X is a vector, returns the variance.  For matrices,
%    where each row is an observation, and each column a variable,
%    COV(X) is the covariance matrix.  DIAG(COV(X)) is a vector of
%    variances for each column, and SQRT(DIAG(COV(X))) is a vector
%    of standard deviations. COV(X,Y), where X and Y are
%    vectors of equal length, is equivalent to COV([X(:) Y(:)]). 
%    
%    COV(X) or COV(X,Y) normalizes by (N-1) where N is the number of
%    observations.  This makes COV(X) the best unbiased estimate of the
%    covariance matrix if the observations are from a normal distribution.
% 
%    COV(X,1) or COV(X,Y,1) normalizes by N and produces the second
%    moment matrix of the observations about their mean.  COV(X,Y,0) is
%    the same as COV(X,Y) and COV(X,0) is the same as COV(X).
% 
%    The mean is removed from each column before calculating the
%    result.
% 
%    

function csd
%MATLAB Tour Partial Function Help:  sig_con
%
% CSD Cross Spectral Density estimate.
%    Pxy = CSD(X,Y,NFFT,Fs,WINDOW) estimates the Cross Spectral Density of 
%    signal vectors X and Y using Welch's averaged periodogram method.  X and
%    Y are divided into overlapping sections, each of which is detrended, 
%    then windowed by the WINDOW parameter, then zero-padded to length NFFT.
%    The products of the length NFFT DFTs of the sections of X and Y are 
%    averaged to form Pxy.  Pxy is length NFFT/2+1 for NFFT even, (NFFT+1)/2
%    for NFFT odd, or NFFT if the either X or Y is complex.  If you specify 
%    a scalar for WINDOW, a Hanning window of that length is used.  Fs is the
%    sampling frequency which doesn't effect the cross spectrum estimate 
%    but is used for scaling of plots.
% 
%    [Pxy,F] = CSD(X,Y,NFFT,Fs,WINDOW,NOVERLAP) returns a vector of frequen-
%    cies the same size as Pxy at which the CSD is estimated, and overlaps
%    the X and Y sections NOVERLAP samples.
% 
%    [Pxy, Pxyc, F] = CSD(X,Y,NFFT,Fs,WINDOW,NOVERLAP,P) where P is a scalar
%    between 0 and 1, returns the P*100% confidence interval for Pxy.
% 
%    CSD(X,Y,...,DFLAG), where DFLAG can be 'linear', 'mean' or 'none', 
%    specifies a detrending mode for the prewindowed sections of X and Y.
%    DFLAG can take the place of any parameter in the parameter list
%    (besides X and Y) as long as it is last, e.g. CSD(X,Y,'mean');
%    
%    CSD with no output arguments plots the CSD in the current figure window,
%    with confidence intervals if you provide the P parameter.
% 
%    The default values for the parameters are NFFT = 256 (or LENGTH(X),
%    whichever is smaller), NOVERLAP = 0, WINDOW = HANNING(NFFT), Fs = 2, 
%    P = .95, and DFLAG = 'none'.  You can obtain a default parameter by 
%    leaving it off or inserting an empty matrix [], e.g. CSD(X,Y,[],10000).
% 
%    

function pcov
%MATLAB Tour Partial Function Help:  sig_con
%
% PCOV   Power Spectrum estimate via Covariance method.
%    Pxx = PCOV(X,ORDER,NFFT) is the Power Spectral Density estimate,
%    Pxx(w), of signal vector X using the Covariance method.  ORDER is
%    the model order of the AR model equations. NFFT is the FFT length
%    which determines the frequency grid.  Pxx is length (NFFT/2+1) for
%    NFFT even, (NFFT+1)/2 for NFFT odd, and NFFT if X is complex.  NFFT
%    is optional; it defaults to 256.
% 
%    [Pxx,W] = PCOV(X,ORDER,NFFT) returns a vector of frequencies, W,
%    in rads/sample, at which the PSD is estimated.   
% 
%    PCOV with no output arguments plots the PSD in the next available
%    figure.  By default, PCOV will plot the magnitude over the
%    frequency interval [0,Pi) for a real signal vector X and over the
%    frequency interval [0,2*pi) for a complex vector X.  To plot the PSD 
%    over the interval [0,2*Pi) for a real X use:
%    PCOV(X,ORDER,NFFT,'whole').
% 
%    [Pxx,F] = PCOV(X,ORDER,NFFT,Fs) or PCOV(X,ORDER,NFFT,Fs,'whole') 
%    return the PSD estimate, Pxx(f)/Fs, and the vector of frecuencies,
%    F, in Hz, at which the PSD is estimated.  If left empty, Fs defaults
%    to 1 Hz. If no output arguments are given and Fs is specified, the
%    plot will be over the frequency interval [0,Fs/2) for a real signal
%    vector X and over the frequency interval [0,Fs) for a complex vector X.
% 
%    PCOV(X,ORDER,NFFT,Fs,'whole','squared') will plot the PSD estimate 
%    directly instead of converting to decibels.
% 
%    You can obtain a default parameter for NFFT and Fs by inserting an 
%    empty matrix [], e.g., PCOV(X,4,[],1000).
% 
%    

function peig
%MATLAB Tour Partial Function Help:  sig_con
%
% PEIG  Power Spectrum estimate via the EigenVector method.
%    Pxx = PEIG(X,P,NFFT) is the Power Spectral Density (PSD) estimate,
%    Pxx(w), of signal vector X using the eigenvector method.  P is the
%    number of eigenvectors in the signal subspace. If X is a data matrix,
%    each column is interpreted as a separate sensor measurement or trial.
%    Pxx is length (NFFT/2+1) for NFFT even, (NFFT+1)/2 for NFFT odd, and
%    NFFT if X is complex. NFFT is optional; it defaults to 256.
% 
%    [Pxx,W] = PEIG(X,P,NFFT) returns the frequency vector, W, in
%    rads/sample, at which the PSD is estimated. The PSD estimate is
%    computed over the interval [0, pi) for a real signal X and over the
%    interval [0, 2pi) for a complex X.
% 
%    Pxx = PEIG(X,[P THRESH],NFFT) uses THRESH as a cutoff for signal 
%    and noise subspace separation.  All eigenvalues greater than THRESH
%    times the smallest eigenvalue are designated as signal eigenvalues.
%    In this case, the signal subspace dimension is at most P.
% 
%    [Pxx,F] = PEIG(X,P,NFFT,Fs) returns the PSD estimate, Pxx(f)/Fs, 
%    and the vector of frecuencies, F, in Hz, at which the PSD is
%    estimated. Fs is the sampling frequency.  In this case, the PSD
%    estimate is computed over the interval [0, Fs/2) for a real signal X
%    and over the interval [0, Fs) for a complex X.  If left empty, Fs
%    defaults to 1 Hz.
% 
%    [Pxx,F] = PEIG(X,P,NFFT,Fs,NW,NOVERLAP) divides signal vector
%    X into sections of length NW which overlap by NOVERLAP samples. The
%    sections are concatenated as the columns of a matrix whose
%    eigenvectors are used in computing Pxx. NOVERLAP is ignored if X is
%    already a matrix.  Default values are NW = 2*P, and NOVERLAP = NW-1,
%    if you leave them unspecified.  If NW is a vector, it is used to
%    window the overlapping sections  
% 
%    PEIG with no output arguments plots the PSD in the next available
%    figure.
% 
%    You can obtain a default parameter by inserting an empty matrix [],
%    e.g., PEIG(X,3,[],400,8).
% 
%    [Pxx,F,V,E] = PEIG(...) returns a matrix V of eigenvectors that
%    compose the estimate (v_k in Marple) and vector E of eigenvalues. The
%    columns of V span the noise subspace. The dimension of the signal
%    subspace is equal to size(V,1) - size(V,2).
%    
%    

function pmcov
%MATLAB Tour Partial Function Help:  sig_con
%
% PMCOV   Power Spectrum estimate via Modified Covariance method.
%    Pxx = PMCOV(X,ORDER,NFFT) is the Power Spectral Density estimate,
%    Pxx(w), of signal vector X using the Modified Covariance method.  
%    ORDER is the model order of the AR model equations. NFFT is the FFT
%    length which determines the frequency grid.  Pxx is length (NFFT/2+1)
%    for NFFT even, (NFFT+1)/2 for NFFT odd, and NFFT if X is complex.
%    NFFT is optional; it defaults to 256.
% 
%    [Pxx,W] = PMCOV(X,ORDER,NFFT) returns a vector of frequencies, W,
%    in rads/sample, at which the PSD is estimated.   
% 
%    PMCOV with no output arguments plots the PSD in the next available
%    figure.  By default, PMCOV will plot the magnitude over the
%    frequency interval [0,Pi] for a real signal vector X and over the
%    frequency interval [0,2*pi) for a complex vector X.  To plot the PSD 
%    over the interval [0,2*Pi) for a real X use:
%    PMCOV(X,ORDER,NFFT,'whole').
% 
%    [Pxx,F] = PMCOV(X,ORDER,NFFT,Fs) or PMCOV(X,ORDER,NFFT,Fs,'whole') 
%    return the PSD estimate, Pxx(f)/Fs, and the vector of frecuencies,
%    F, in [Hz], at which the PSD is estimated.  If left empty, Fs defaults
%    to 1 Hz. If no output arguments are given and Fs is specified, the
%    plot will be over the frequency interval [0,Fs/2] for a real signal
%    vector X and over the frequency interval [0,Fs) for a complex vector X.
% 
%    PMCOV(X,ORDER,NFFT,Fs,'whole','squared') will plot the PSD estimate 
%    directly instead of converting to decibels.
% 
%    You can obtain a default parameter for NFFT and Fs by inserting an 
%    empty matrix [], e.g., PMCOV(X,4,[],1000).
% 
%    

function pburg
%MATLAB Tour Partial Function Help:  sig_con
%
% PBURG   Power Spectrum estimate via Burg's method.
%    Pxx = PBURG(X,ORDER,NFFT) is the Power Spectral Density estimate,
%    Pxx(w), of signal vector X using Burg's method.  ORDER is the model
%    order of the AR model equations. NFFT is the FFT length which 
%    determines the frequency grid.  Pxx is length (NFFT/2+1) for NFFT even,
%    (NFFT+1)/2 for NFFT odd, and NFFT if X is complex.  
%    NFFT is optional; it defaults to 256.
% 
%    [Pxx,W] = PBURG(X,ORDER,NFFT) returns a vector of frequencies, W,
%    in rads/sample, at which the PSD is estimated.   
% 
%    PBURG with no output arguments plots the PSD in the next available
%    figure.  By default, PBURG will plot the magnitude over the
%    frequency interval [0,Pi) for a real signal vector X and over the
%    frequency interval [0,2*pi) for a complex vector X.  To plot the PSD 
%    over the interval [0,2*Pi) for a real X use:
%    PBURG(X,ORDER,NFFT,'whole').
% 
%    [Pxx,F] = PBURG(X,ORDER,NFFT,Fs) or PBURG(X,ORDER,NFFT,Fs,'whole') 
%    return the PSD estimate, Pxx(f)/Fs, and the vector of frecuencies,
%    F, in Hz, at which the PSD is estimated.  If left empty, Fs defaults
%    to 1 Hz. If no output arguments are given and Fs is specified, the
%    plot will be over the frequency interval [0,Fs/2) for a real signal
%    vector X and over the frequency interval [0,Fs) for a complex vector X.
% 
%    PBURG(X,ORDER,NFFT,Fs,'whole','squared') will plot the PSD estimate 
%    directly instead of converting to decibels.
% 
%    You can obtain a default parameter for NFFT and Fs by inserting an 
%    empty  matrix [], e.g., PBURG(X,4,[],1000).
% 
%    

function pmtm
%MATLAB Tour Partial Function Help:  sig_con
%
% PMTM   Power Spectrum estimate via the Thomson multitaper method.
%    Pxx = PMTM(X) is the Power Spectral Density (PSD) estimate, Pxx(w),
%    of time series X using MTM (multitaper method).  
% 
%    Pxx = PMTM(X,NW,NFFT) uses NW as the "time-bandwidth product" for
%    the discrete prolate spheroidal sequences (or Slepian sequences)
%    used as data windows.  Typical choices for NW are 2, 5/2, 3, 7/2, or
%    4 (the default is 4).  The number of sequences used to form Pxx is
%    2*NW-1.  NFFT defines the frequency grid NFFT. When X is real, Pxx
%    is length (NFFT/2+1) for NFFT even or (NFFT+1)/2 for NFFT odd; when
%    X is complex, Pxx is length NFFT.  NFFT is optional; it defaults to
%    the greater of 256 and the next power of 2 greater than the length
%    of X.
% 
%    [Pxx,W] = PMTM(X,NW,NFFT) returns the frequency vector, W, in
%    rads/sample at which the PSD is estimated.  The PSD estimate is 
%    computed over the interval [0, pi) for a real signal X and over the
%    interval [0, 2pi) for a complex X.
% 
%    [Pxx,F] = PMTM(X,NW,NFFT,Fs) return the PSD estimate, Pxx(f)/Fs, and
%    the vector of frequencies, F, in Hz, at which the PSD is estimated.
%    Fs is the sampling frequency.  In this case, the PSD estimate is
%    computed over the interval [0, Fs/2) for a real signal X and over
%    the interval [0, Fs) for a complex X.  If left empty, Fs defaults to
%    1 Hz.
%    
%    [Pxx,F] = PMTM(X,NW,NFFT,Fs,method) uses the algorithm in method for
%    combining the individual spectral estimates:
%       'adapt'  - Thomson's adaptive non-linear combination (default).
%       'unity'  - linear combination with unity weights.
%       'eigen'  - linear combination with eigenvalue weights.
% 
%    [Pxx,Pxxc,F] = PMTM(X,NW,NFFT,Fs,method) returns the 95% confidence
%    interval Pxxc for Pxx. [Pxx,Pxxc,F] = PMTM(X,NW,NFFT,Fs,method,P)
%    where P is a scalar between 0 and 1, returns the P*100% confidence
%    interval for Pxx. Confidence intervals are computed using a
%    chi-squared approach. Pxxc(:,1) is the lower bound of the confidence
%    interval, Pxxc(:,2) is the upper bound.
% 
%    PMTM with no output arguments plots the PSD in the current or next 
%    available figure, with confidence intervals.
% 
%    [Pxx,Pxxc,F] = PMTM(X,E,V,NFFT,Fs,method,P) is the PSD estimate,
%    confidence interval, and frequency vector from the data tapers in E
%    and their concentrations V.
% 
%    [Pxx,Pxxc,F] = PMTM(X,DPSS_PARAMS,NFFT,Fs,method,P) is the PSD
%    estimate, confidence interval, and frequency vector from the data
%    tapers computed with the function DPSS with parameters in the cell
%    array DPSS_PARAMS. The elements of DPSS_PARAMS contain the
%    parameters to DPSS starting with the second one. For example,
%    PMTM(X,{3.5,'trace'},512,Fs) calculates the Slepian sequences and 
%    returns the method DPSS uses.  See HELP DPSS for options.
% 
%    You can obtain default parameters by inserting an empty matrix [],
%    e.g. PMTM(X,[],[],10000) uses defaults for NW and NFFT.
% 
%    EXAMPLE
%       Fs = 1000;   t = 0:1/Fs:.3;  x = cos(2*pi*t*200)+randn(size(t));
%       [Pxx,Pxxc,f] = pmtm(x,3.5,512,Fs,[],.99);
%       plot(f,10*log10([Pxx Pxxc]))
% 
%    

function pmusic
%MATLAB Tour Partial Function Help:  sig_con
%
% PMUSIC  Power Spectrum estimate via MUSIC eigenvector method.
%    Pxx = PMUSIC(X,P,NFFT) is the Power Spectral Density (PSD) estimate,
%    Pxx(w), of signal vector X using Schmidt's eigen-analysis method,
%    MUSIC (an acronym for "Multiple Signal Classification").  P is the
%    number of eigenvectors in the signal subspace. If X is a data matrix,
%    each column is interpreted as a separate sensor measurement or trial.
%    Pxx is length (NFFT/2+1) for NFFT even, (NFFT+1)/2 for NFFT odd, and
%    NFFT if X is complex. NFFT is optional; it defaults to 256.
% 
%    [Pxx,W] = PMUSIC(X,P,NFFT) returns the frequency vector, W, in
%    rads/sample, at which the PSD is estimated. The PSD estimate is
%    computed over the interval [0, pi) for a real signal X and over the
%    interval [0, 2pi) for a complex X.
% 
%    Pxx = PMUSIC(X,[P THRESH],NFFT) uses THRESH as a cutoff for signal 
%    and noise subspace separation.  All eigenvalues greater than THRESH
%    times the smallest eigenvalue are designated as signal eigenvalues.
%    In this case, the signal subspace dimension is at most P.
% 
%    [Pxx,F] = PMUSIC(X,P,NFFT,Fs) returns the PSD estimate, Pxx(f)/Fs, 
%    and the vector of frecuencies, F, in Hz, at which the PSD is
%    estimated. Fs is the sampling frequency.  In this case, the PSD
%    estimate is computed over the interval [0, Fs/2) for a real signal X
%    and over the interval [0, Fs) for a complex X.  If left empty, Fs
%    defaults to 1 Hz.
% 
%    [Pxx,F] = PMUSIC(X,P,NFFT,Fs,NW,NOVERLAP) divides signal vector
%    X into sections of length NW which overlap by NOVERLAP samples. The
%    sections are concatenated as the columns of a matrix whose
%    eigenvectors are used in computing Pxx. NOVERLAP is ignored if X is
%    already a matrix.  Default values are NW = 2*P, and NOVERLAP = NW-1,
%    if you leave them unspecified.  If NW is a vector, it is used to
%    window the overlapping sections.
% 
%    Use a trailing 'corr' flag if X is a square correlation matrix, e.g.
%    [Pxx,F] = PMUSIC(X,P,NFFT,Fs,'corr').  This uses EIG directly
%    instead of SVD on the signal matrix and squaring the singular values.
%    In this case X must be hermitian and have no negative eigenvalues.
% 
%    PMUSIC with no output arguments plots the PSD in the next available
%    figure.
% 
%    You can obtain a default parameter by inserting an empty matrix [],
%    e.g., PMUSIC(X,3,[],400,8).
% 
%    [Pxx,F,V,E] = PMUSIC(...) returns a matrix V of eigenvectors that
%    compose the estimate (v_k in Marple) and vector E of eigenvalues. The
%    columns of V span the noise subspace. The dimension of the signal
%    subspace is equal to size(V,1) - size(V,2).
%    
%    

function pyulear
%MATLAB Tour Partial Function Help:  sig_con
%
% PYULEAR   Power Spectrum estimate via Yule-Walker's method.
%    Pxx = PYULEAR(X,ORDER,NFFT) is the Power Spectral Density estimate,
%    Pxx(w), of signal vector X using Yule-Walker's method.  ORDER is the
%    model order of the AR model equations. NFFT is the FFT length which 
%    determines the frequency grid.  Pxx is length (NFFT/2+1) for NFFT
%    even, (NFFT+1)/2 for NFFT odd, and NFFT if X is complex.
%    NFFT is optional; it defaults to 256. 
% 
%    [Pxx,W] = PYULEAR(X,ORDER,NFFT) returns a vector of frequencies, W,
%    in rads/sample, at which the PSD is estimated.   
% 
%    PYULEAR with no output arguments plots the PSD in the next available
%    figure.  By default, PYULEAR will plot the magnitude over the
%    frequency interval [0,Pi) for a real signal vector X and over the
%    frequency interval [0,2*pi) for a complex vector X.  To plot the PSD 
%    over the interval [0,2*Pi) for a real X use:
%    PYULEAR(X,ORDER,NFFT,'whole').
% 
%    [Pxx,F] = PYULEAR(X,ORDER,NFFT,Fs) or PYULEAR(X,ORDER,NFFT,Fs,'whole') 
%    return the PSD estimate, Pxx(f)/Fs, and the vector of frecuencies,
%    F, in Hz, at which the PSD is estimated.  If left empty, Fs defaults
%    to 1 Hz. If no output arguments are given and Fs is specified, the
%    plot will be over the frequency interval [0,Fs/2) for a real signal
%    vector X and over the frequency interval [0,Fs) for a complex vector X.
% 
%    PYULEAR(X,ORDER,NFFT,Fs,'whole','squared') will plot the PSD estimate 
%    directly instead of converting to decibels.
% 
%    You can obtain a default parameter for NFFT and Fs by inserting an 
%    empty matrix [], e.g., PYULEAR(X,4,[],1000).
% 
%    

function pwelch
%MATLAB Tour Partial Function Help:  sig_con
%
% PWELCH Power Spectral Density estimate via Welch's method.
%    Pxx = PWELCH(X) returns the Power Spectral Density (PSD) estimate, 
%    Pxx(w) of a discrete-time signal vector X using Welch's averaged, 
%    modified periodogram method.  Pxx(w) is a function of normalized 
%    angular frequency, w=2*pi*f/Fs [rads/samp].
% 
%    [Pxx,W] = PWELCH(X) returns a frequency vector, W, in units of 
%    rads/sample at which the PSD is estimated. Pxx(w) is computed over 
%    the interval [0,pi) for a real signal X and over the interval 
%    [0,2pi) for a complex X.
% 
%    [Pxx,F] = PWELCH(X,NFFT,Fs) returns the PSD estimate, Pxx(f)/Fs, 
%    and the frequency vector, F, in Hz, at which the PSD is estimated.
%    The PSD estimate is computed over the interval [0,Fs/2) for a real 
%    signal X and over the interval [0,Fs) for a complex X.
% 
%    [Pxx,F] = PWELCH(X,NFFT,Fs,WINDOW,NOVERLAP) X is divided into overlap-
%    ping sections, then windowed by the WINDOW parameter, then zero-padded
%    to length NFFT.  The magnitude squared of the length NFFT DFTs of the 
%    sections are averaged to form Pxx.  Pxx is length NFFT/2+1 for NFFT
%    even, (NFFT+1)/2 for NFFT odd, or NFFT if the signal X is complex. If  
%    you specify a scalar for WINDOW, a Hanning window of that length is 
%    used.
% 
%    [Pxx, Pxxc, F] = PWELCH(X,NFFT,Fs,WINDOW,NOVERLAP,P) where P is a
%    scalar between 0 and 1, returns the P*100% confidence interval for Pxx.
% 
%    PWELCH with no output arguments plots the PSD in the current figure 
%    window, with confidence intervals if you provide the P parameter.  By 
%    default, PWELCH will plot the magnitude, in decibels, over the 
%    frequency interval [0,pi) for a real signal vector X, and over the 
%    frequency interval [0,2pi) for a complex vector X.  If Fs is specified
%    then the intervals become [0,Fs/2) and [0,Fs), respectively.
% 
%    PWELCH(X,NFFT,Fs,WINDOW,NOVERLAP,P,RANGE,MAGUNITS), where RANGE can
%    be 'half' or 'whole', specifies the frequency intervals [0,Fs/2) and
%    [0,Fs) respectively.  MAGUNITS can be either 'squared' or 'db' and
%    it specifies the magnitude units of the PSD plot.  The MAGUNITS option
%    only affects the plot. To plot the PSD without converting to decibles,
%    over the interval [0,Fs) for a real X use: 
%    PWELCH(X,NFFT,Fs,WINDOW,NOVERLAP,P,'whole','squared').
% 
%    RANGE can take the place of any parameter in the parameter list
%    (besides X) as long as it is last, e.g. PSD(X,'whole');
% 
%    The default values for the parameters are NFFT = 256 (or LENGTH(X),
%    whichever is smaller), NOVERLAP = 0, WINDOW = HANNING(NFFT), Fs = 1, 
%    P = .95, RANGE = 'half', and MAGUNITS = 'db'.  
%    You can obtain a default parameter by leaving it off or inserting an 
%    empty matrix [], e.g. PWELCH(X,[],10000).
% 
%    

function spectrum
%MATLAB Tour Partial Function Help:  sig_con
%
% SPECTRUM Power spectrum estimate of one or two data sequences.
%    P=SPECTRUM(X,NFFT,NOVERLAP,WIND) estimates the Power Spectral Density of
%    signal vector X using Welch's averaged periodogram method. The signal X
%    is divided into overlapping sections, each of which is detrended and 
%    windowed by the WINDOW parameter, then zero padded to length NFFT. The 
%    magnitude squared of the length NFFT DFTs of the sections are averaged 
%    to form Pxx.  P is a two column matrix P = [Pxx Pxxc]; the second column
%    Pxxc is the 95% confidence interval. The number of rows of P is NFFT/2+1
%    for NFFT even, (NFFT+1)/2 for NFFT odd, or NFFT if the signal X is comp-
%    lex. If you specify a scalar for WINDOW, a Hanning window of that length
%    is used.
% 
%    [P,F] = SPECTRUM(X,NFFT,NOVERLAP,WINDOW,Fs) given a sampling frequency
%    Fs returns a vector of frequencies the same length as Pxx at which the 
%    PSD is estimated.  PLOT(F,P(:,1)) plots the power spectrum estimate 
%    versus true frequency.
% 
%    [P, F] = SPECTRUM(X,NFFT,NOVERLAP,WINDOW,Fs,Pr) where Pr is a scalar 
%    between 0 and 1, overrides the default 95% confidence interval and 
%    returns the Pr*100% confidence interval for Pxx instead.
% 
%    SPECTRUM(X) with no output arguments plots the PSD in the current
%    figure window, with confidence intervals.
% 
%    The default values for the parameters are NFFT = 256 (or LENGTH(X),
%    whichever is smaller), NOVERLAP = 0, WINDOW = HANNING(NFFT), Fs = 2, 
%    and Pr = .95. You can obtain a default parameter by leaving it out
%    or inserting an empty matrix [], e.g. SPECTRUM(X,[],128).
% 
%    P = SPECTRUM(X,Y) performs spectral analysis of the two sequences
%    X and Y using the Welch method. SPECTRUM returns the 8 column array
%       P = [Pxx Pyy Pxy Txy Cxy Pxxc Pyyc Pxyc]
%    where
%       Pxx  = X-vector power spectral density
%       Pyy  = Y-vector power spectral density
%       Pxy  = Cross spectral density
%       Txy  = Complex transfer function from X to Y = Pxy./Pxx
%       Cxy  = Coherence function between X and Y = (abs(Pxy).^2)./(Pxx.*Pyy)
%       Pxxc,Pyyc,Pxyc = Confidence range.
%    All input and output options are otherwise exactly the same as for the
%    single input case.
%    
%    SPECTRUM(X,Y) with no output arguments will plot Pxx, Pyy, abs(Txy),
%    angle(Txy) and Cxy in sequence, pausing between plots.
% 
%    SPECTRUM(X,...,DFLAG), where DFLAG can be 'linear', 'mean' or 'none', 
%    specifies a detrending mode for the prewindowed sections of X (and Y).
%    DFLAG can take the place of any parameter in the parameter list
%    (besides X) as long as it is last, e.g. SPECTRUM(X,'none');
% 
%    

function tfe
%MATLAB Tour Partial Function Help:  sig_con
%
% TFE Transfer Function Estimate.
%    Txy = TFE(X,Y,NFFT,Fs,WINDOW) estimates the transfer function of the 
%    system with input X and output Y using Welch's averaged periodogram 
%    method.  X and Y are divided into overlapping sections, each of which 
%    is detrended, then windowed by the WINDOW parameter, then zero-padded 
%    to length NFFT.  The magnitude squared of the length NFFT DFTs of the 
%    sections of X are averaged to form Pxx, the Power Spectral Density of X.
%    The products of the length NFFT DFTs of the sections of X and Y are 
%    averaged to form Pxy, the Cross Spectral Density of X and Y.  Txy
%    is the quotient of Pxy and Pxx; it has length NFFT/2+1 for NFFT even, 
%    (NFFT+1)/2 for NFFT odd, or NFFT if X or Y is complex. If you specify 
%    a scalar for WINDOW, a Hanning window of that length is used.  Fs is 
%    the sampling frequency which does not effect the transfer function 
%    estimate but is used for scaling of plots.
% 
%    [Txy,F] = TFE(X,Y,NFFT,Fs,WINDOW,NOVERLAP) returns a vector of freq-
%    uencies the same size as Txy at which the transfer function is 
%    estimated, and overlaps the sections of X and Y by NOVERLAP samples.
% 
%    TFE(X,Y,...,DFLAG), where DFLAG can be 'linear', 'mean' or 'none', 
%    specifies a detrending mode for the prewindowed sections of X and Y.
%    DFLAG can take the place of any parameter in the parameter list
%    (besides X and Y) as long as it is last, e.g. TFE(X,Y,'mean');
%    
%    TFE with no output arguments plots the transfer function estimate in 
%    the current figure window.
% 
%    The default values for the parameters are NFFT = 256 (or LENGTH(X),
%    whichever is smaller), NOVERLAP = 0, WINDOW = HANNING(NFFT), Fs = 2, 
%    P = .95, and DFLAG = 'none'.  You can obtain a default parameter by 
%    leaving it off or inserting an empty matrix [], e.g. TFE(X,Y,[],10000).
% 
%    

function xcorr
%MATLAB Tour Partial Function Help:  sig_con
%
% XCORR Cross-correlation function estimates.
%    C = XCORR(A,B), where A and B are length M vectors (M>1), returns
%    the length 2*M-1 cross-correlation sequence C. If A and B are of
%    different length, the shortest one is zero-padded.  C will be a
%    row vector if A is a row vector, and a column vector if A is a 
%    column vector.
% 
%    XCORR(A), when A is a vector, is the auto-correlation sequence.   
%    XCORR(A), when A is an M-by-N matrix, is a large matrix with
%    2*M-1 rows whose N^2 columns contain the cross-correlation
%    sequences for all combinations of the columns of A.
%    The zeroth lag of the output correlation is in the middle of the 
%    sequence, at element or row M.
% 
%    XCORR(A,B,MAXLAG) computes the cross-correlation over the
%    range of lags:  -MAXLAG to MAXLAG, i.e., 2*MAXLAG+1 lags.
%    XCORR(A,MAXLAG) computes the auto-correlation over the
%    range of lags.   If missing, default is MAXLAG = M-1.
% 
%    [C,LAGS] = XCORR  returns a vector of lag indices (LAGS).
% 
%    XCORR(A,'flag'), XCORR(A,B,'flag') or XCORR(A,B,MAXLAG,'flag') 
%    normalizes the correlation according to 'flag':
%        biased   - scales the raw cross-correlation by 1/M.
%        unbiased - scales the raw correlation by 1/(M-abs(lags))
%        coeff    - normalizes the sequence so that the auto-correlations
%                   at zero lag are identically 1.0.
%        none     - no scaling (this is the default).
% 
%    

function xcov
%MATLAB Tour Partial Function Help:  sig_con
%
% XCOV   Cross-covariance function estimates.
%    The cross-covariance is the cross-covariance function of
%    two sequences with their means removed.
%    XCOV(A,B), where A and B are length M vectors, returns the
%    length 2*M-1 cross-covariance sequence in a column vector.
%    XCOV(A), when A is a vector, is the auto-covariance sequence.
%    XCOV(A), when A is an M-by-N matrix, is a large matrix with
%    2*M-1 rows whose N^2 columns contain the cross-covariance
%    sequences for all combinations of the columns of A.
%    The zeroth lag of the output covariance is in the middle of the 
%    sequence, at element or row M.
% 
%    XCOV(A,B,MAXLAG) computes the (cross) covariance over the
%    range of lags:  -MAXLAG to MAXLAG, i.e., 2*MAXLAG+1 lags.
%    If missing, default is MAXLAG = M-1.
%    [C,LAGS] = XCOV returns a vector of lag indices (LAGS).
%    
%    XCOV(A,'flag'), XCOV(A,B,'flag') or XCOV(A,B,MAXLAG,'flag') 
%    normalizes the covariance according to 'flag':
%        biased   - scales the raw cross-covariance by 1/M.
%        unbiased - scales the raw covariance by 1/(M-abs(k)), where k 
%                   is the index into the result.
%        coeff    - normalizes the sequence so that the covariances at 
%                   zero lag are identically 1.0.
%        none     - no scaling (this is the default).
%    
%    

function arburg
%MATLAB Tour Partial Function Help:  sig_con
%
% ARBURG   AR parameter estimation via Burg method.
%    A = ARBURG(X,ORDER) returns the polynomial A corresponding to the AR
%    parametric signal model estimate of vector X using Burg's method.
%    ORDER is the model order of the AR system.
% 
%    [A,E] = ARBURG(...) returns the final prediction error E (the variance
%    estimate of the white noise input to the AR model).
% 
%    [A,E,K] = ARBURG(...) returns the vector K of reflection 
%    coefficients (parcor coeff.)
% 
% 
%    

function arcov
%MATLAB Tour Partial Function Help:  sig_con
%
% ARCOV   AR parameter estimation via covariance method.
%    A = ARCOV(X,ORDER) returns the polynomial A corresponding to the AR
%    parametric signal model estimate of vector X using the Covariance method.
%    ORDER is the model order of the AR system.
% 
%    [A,E] = ARCOV(...) returns the variance estimate E of the white noise
%    input to the AR model.
% 
%    

function armcov
%MATLAB Tour Partial Function Help:  sig_con
%
% ARMCOV   AR parameter estimation via modified covariance method.
%    A = ARMCOV(X,ORDER) returns the polynomial A corresponding to the AR
%    parametric signal model estimate of vector X using the Modified Covariance
%    method. ORDER is the model order of the AR system. 
% 
%    [A,E] = ARMCOV(...) returns the variance estimate E of the white noise
%    input to the AR model.
% 
%    

function aryule
%MATLAB Tour Partial Function Help:  sig_con
%
% ARYULE   AR parameter estimation via Yule-Walker method.
%    A = ARYULE(X,ORDER) returns the polynomial A corresponding to the AR
%    parametric signal model estimate of vector X using the Yule-Walker
%    (autocorrelation) method.  ORDER is the model order of the AR system. 
%    This method solves the Yule-Walker equations by means of the Levinson-
%    Durbin recursion.
% 
%    [A,E] = ARYULE(...) returns the final prediction error E (the variance
%    estimate of the white noise input to the AR model).
% 
%    [A,E,K] = ARYULE(...) returns the vector K of reflection coefficients.
% 
%    

function ident
%MATLAB Tour Partial Function Help:  sig_con
%
%  System Identification Toolbox.
%  Version 4.0.5 (R11) 10-Apr-1998
% 
%  New Features.
%    Readme      - Important release information about the System ID Toolbox 
%                  (double click on Readme, or type "whatsnew directoryname", 
%                   i.e. "whatsnew ident" to display this file).
%  Demos
%    iddemo     - Demonstrates the use of the toolbox.
% 
%  Graphical User Interface
%    ident      - A comprehensive estimation and analysis environment.
%    midprefs   - Specify a directory for start-up information.
% 
%  Simulation and prediction.
%    idsim      - Simulate a given system.
%    pe         - Prediction errors.
%    poly2th    - Construct a "theta-matrix" from given polynomials.
%    predict    - M-step ahead prediction.
% 
%  Data manipulation.
%    dtrend     - Remove trends from data sets.1
%    idfilt     - Filter data through Butterworth filters.
%    idinput    - Generates input signals for identification.
%    idresamp   - Resamples data by decimation and interpolation.
% 
%  Nonparametric estimation.
%    covf       - Covariance function estimate for a data matrix.
%    cra        - Correlation analysis.
%    etfe       - Empirical Transfer Function Estimate and Periodogram.
%    spa        - Spectral analysis.
% 
%  Parameter estimation.
%    ar         - AR-models of signals using various approaches.
%    armax      - Prediction error estimate of an ARMAX model.
%    arx        - LS-estimate of ARX-models.
%    bj         - Prediction error estimate of a Box-Jenkins model.
%    canstart   - Multivariable theta-model with initial parameter estimates.
%    ivar       - IV-estimates for the AR-part of a scalar time series.
%    iv4        - Approximately optimal IV-estimates for ARX-models.
%    n4sid      - State-space model estimation using a sub-space method.
%    oe         - Prediction error estimate of an output-error model.
%    pem        - Prediction error estimate of a general linear model.
% 
%  Model structure creation.
%    arx2th     - THETA-format for an ARX model.
%    canform    - Canonical form model structures.
%    mf2th      - Package user defined model structures into the THETA model format.
%    modstruc   - Model structures to be used in MS2TH.
%    ms2th      - Package standard state-space parameterizations into the THETA format.
%    poly2th    - "Theta-matrix" from given polynomials.
% 
%  Manipulating model structures.
%    fixpar     - Fix parameters in state-space and ARX model structures.
%    sett       - Set the sampling interval in TH-structures.
%    thinit     - (Random) initial values for the parameters.
%    unfixpar   - Unfix parameters in state-space and ARX model structures.
% 
%  Model conversions.
%    idmodred   - Reduce a model to lower order.
%    th2arx     - Convert a THETA-format model to an ARX-model.
%    th2ff      - Model's frequency function, along with its standard deviation.
%    th2par     - Theta-format to parameters and covariance matrix.
%    th2poly    - Polynomials associated with a given model.
%    th2ss      - THETA model conversion to state-space.
%    th2tf      - THETA model conversion to transfer function.
%    th2zp      - Zeros, poles, static gains and their standard deviations.
%    thc2thd    - Continuous time model to discrete time.
%    thd2thc    - Model to continuous-time form.
% 
%  Model presentation.
%    bodeplot   - Bode diagram of a transfer function or spectrum.
%    ffplot     - Frequency functions.
%    idplot     - Input - output data.
%    nyqplot    - Nyquist diagram of a transfer function.
%    present    - Parametric model on the screen.
%    zpplot     - Zeros and poles.
% 
%  Information extraction.
%    getmfth    - Get the name of the .m-file that defines the model structure.
%    getncap    - Get the number of data points and the number of parameters.
%    getff      - Select the frequency function (for own plotting).
%    gett       - Get the sampling interval for a model.
%    getzp      - Extract the zeros and the poles from the ZEPO-format created by TH2ZP.
%    th2par     - Theta-format to parameters and covariance matrix.
% 
%  Model validation.
%    compare    - Compare the simulated/predicted output with the measured output.
%    idsim      - Simulate a given system.
%    pe         - Prediction errors.
%    predict    - M-step ahead prediction.
%    resid      - Compute and test the residuals associated with a model.
% 
%  Assessing model uncertainty.
%    idsimsd    - Illustrate the uncertainty in simulated model responses.
%    th2ff      - Model's frequency function and standard deviation.
%    th2zp      - Zeros, poles, static gains and their standard deviations.
% 
%  Model structure selection.
%    arxstruc   - Loss functions for families of ARX-models.
%    ivstruc    - Output error fit for families of single-output.
%    selstruc   - Select model structures according to various criteria.
%    struc      - Typical structure matrices for ARXSTRUC and IVSTRUC.
%
%
%ident is both a directory and a function.
%
% IDENT  Starts the Graphical User Interface for the System Identification Toolbox.
% 
%    ident   or  ident(SESSION,PATH)
%    
%    IDENT by itself opens the main interface window.
%    SESSION is a SITB session file (typically with extension .sid)
%    PATH is the search path for this file. (Not necessary if on the
%    MATHLABPATH.) When SESSION is specified, the interface opens
%    with this session.
%    
%    When the interface is active, ident(SESSION,PATH) will open the
%    session SESSION.

function invfreqs
%MATLAB Tour Partial Function Help:  sig_con
%
% INVFREQS Analog filter least squares fit to frequency response data.
%    [B,A] = INVFREQS(H,W,nb,na) gives real numerator and denominator 
%    coefficients B and A of orders nb and na respectively, where
%    H is the desired complex frequency response of the system at frequency
%    points W, and W contains the frequency values in radians/s.
%    INVFREQS yields a filter with real coefficients.  This means that it is 
%    sufficient to specify positive frequencies only; the filter fits the data 
%    conj(H) at -W, ensuring the proper frequency domain symmetry for a real 
%    filter.
% 
%    [B,A]=INVFREQS(H,W,nb,na,Wt) allows the fit-errors to the weighted
%    versus frequency.  LENGTH(Wt)=LENGTH(W)=LENGTH(H).
%    Determined by minimization of sum |B-H*A|^2*Wt over the freqs in W.
% 
%    [B,A] = INVFREQS(H,W,nb,na,Wt,ITER) does another type of fit:
%    Sum |B/A-H|^2*Wt is minimized with respect to the coefficients in B and
%    A by numerical search in at most ITER iterations.  The A-polynomial is 
%    then constrained to be stable.  [B,A]=INVFREQS(H,W,nb,na,Wt,ITER,TOL)
%    stops the iterations when the norm of the gradient is less than TOL.
%    The default value of TOL is 0.01.  The default value of Wt is all ones.
%    This default value is also obtained by Wt=[].
% 
%    [B,A]=INVFREQS(H,W,nb,na,Wt,ITER,TOL,'trace') provides a textual
%    progress report of the iteration.
% 
%    [B,A] = INVFREQS(H,W,'complex',NB,NA,...) creates a complex filter.  In 
%    this case, no symmetry is enforced. 
% 
%    

function invfreqz
%MATLAB Tour Partial Function Help:  sig_con
%
% INVFREQZ  Discrete filter least squares fit to frequency response data.
%    [B,A] = INVFREQZ(H,W,NB,NA) gives real numerator and denominator 
%    coefficients B and A of orders NB and NA respectively, where
%    H is the desired complex frequency response of the system at frequency
%    points W, and W contains the frequency values in radians/s.
%    INVFREQZ yields a filter with real coefficients.  This means that it is 
%    sufficient to specify positive frequencies only; the filter fits the data 
%    conj(H) at -W, ensuring the proper frequency domain symmetry for a real 
%    filter.
% 
%    [B,A] = INVFREQZ(H,W,NB,NA,Wt) allows the fit-errors to be weighted
%    versus frequency.  LENGTH(Wt)=LENGTH(W)=LENGTH(H).
%    Determined by minimization of sum |B-H*A|^2*Wt over the freqs in W.
% 
%    [B,A] = INVFREQZ(H,W,NB,NA,Wt,ITER) does another type of fit:
%    Sum |B/A-H|^2*Wt is minimized with respect to the coefficients in B and
%    A by numerical search in at most ITER iterations.  The A-polynomial is 
%    then constrained to be stable.  [B,A]=INVFREQZ(H,W,NB,NA,Wt,ITER,TOL)
%    stops the iterations when the norm of the gradient is less than TOL.
%    The default value of TOL is 0.01.  The default value of Wt is all ones.
%    This default value is also obtained by Wt=[].
% 
%    [B,A] = INVFREQZ(H,W,NB,NA,Wt,ITER,TOL,'trace') provides a textual
%    progress report of the iteration.
% 
%    [B,A] = INVFREQZ(H,W,'complex',NB,NA,...) creates a complex filter.  In 
%    this case, no symmetry is enforced. 
% 
%    

function prony
%MATLAB Tour Partial Function Help:  sig_con
%
% PRONY Prony's method for time-domain IIR filter design.
%    [B,A] = PRONY(H, NB, NA) finds a filter with numerator order
%    NB, denominator order NA, and having the impulse response in
%    vector H.   The IIR filter coefficients are returned in
%    length NB+1 and NA+1 row vectors B and A, ordered in
%    descending powers of Z.  H may be real or complex.
% 
%    

function stmcb
%MATLAB Tour Partial Function Help:  sig_con
%
% STMCB Compute linear model via Steiglitz-McBride iteration
%    [B,A] = stmcb(X,NB,NA) finds the coefficients of the system 
%    B(z)/A(z) with approximate impulse response X, NA poles and 
%    NB zeros.
% 
%    [B,A] = stmcb(X,NB,NA,N) uses N iterations.  N defaults to 5.
% 
%    [B,A] = stmcb(X,NB,NA,N,Ai) uses the vector Ai as the initial 
%    guess at the denominator coefficients.  If you don't specify Ai, 
%    STMCB uses [B,Ai] = PRONY(X,0,NA) as the initial conditions.
% 
%    [B,A] = STMCB(X,U,NB,NA,N,Ai) finds the system coefficients B and 
%    A of the system which, given U as input, has X as output.  N and Ai
%    are again optional with default values of N = 5, [B,Ai] = PRONY(X,0,NA).
%    X and U must be the same length.
% 
%    

function ac2rc
%MATLAB Tour Partial Function Help:  sig_con
%
% AC2RC  Convert autocorrelation sequence to reflection coefficients. 
%    [K,R0] = AC2RC(R) returns the reflection coefficients, K, and the zero lag
%    autocorrelation, R0, based on the autocorrelation sequence, R.
% 
%    

function ac2poly
%MATLAB Tour Partial Function Help:  sig_con
%
% AC2POLY  Convert autocorrelation sequence to prediction polynomial.
%    [A,Efinal]=AC2POLY(R) returns the prediction polynomial, A, and the final 
%    prediction error, Efinal, based on the autocorrelation sequence, R.
% 
%    

function is2rc
%MATLAB Tour Partial Function Help:  sig_con
%
% IS2RC  Convert inverse sine parameters to reflection coefficients.
%    K = IS2RC(INV_SIN) returns the reflection coefficients corresponding 
%    to the inverse sine parameters, INV_SIN. 
% 
%    

function lar2rc
%MATLAB Tour Partial Function Help:  sig_con
%
% LAR2RC Convert log area ratios to reflection coefficients.
%    K = LAR2RC(G) returns the reflection coefficients, K, based on the 
%    log area ratios, G.
% 
%    

function levinson
%MATLAB Tour Partial Function Help:  sig_con
%
% LEVINSON  Levinson-Durbin Recursion.
%    A = LEVINSON(R,N) solves the Hermitian Toeplitz system of equations
% 
%        [  R(1)   R(2)* ...  R(N)* ] [  A(2)  ]  = [  -R(2)  ]
%        [  R(2)   R(1)  ... R(N-1)*] [  A(3)  ]  = [  -R(3)  ]
%        [   .        .         .   ] [   .    ]  = [    .    ]
%        [ R(N-1) R(N-2) ...  R(2)* ] [  A(N)  ]  = [  -R(N)  ]
%        [  R(N)  R(N-1) ...  R(1)  ] [ A(N+1) ]  = [ -R(N+1) ]
% 
%    (also known as the Yule-Walker AR equations) using the Levinson-
%    Durbin recursion.  Input R is typically a vector of autocorrelation
%    coefficients with lag 0 as the first element.
% 
%    N is the order of the recursion; if omitted, N = LENGTH(R)-1.
%    A will be a row vector of length N+1, with A(1) = 1.0.
% 
%    [A,E] = LEVINSON(...) returns the prediction error, E, of order N.
% 
%    [A,E,K] = LEVINSON(...) returns the reflection coefficients K as a
%    column vector of length N.  Since K is computed internally while
%    computing the A coefficients, then returning K simultaneously
%    is more efficient than converting A to K afterwards via TF2LATC.
% 
%    If R is a matrix, LEVINSON finds coefficients for each column of R,
%    and returns them in the rows of A
% 
%    

function lpc
%MATLAB Tour Partial Function Help:  sig_con
%
% LPC  Linear Predictor Coefficients.
%    A = LPC(X,N) finds the coefficients, A=[ 1 A(2) ... A(N+1) ],
%    of an Nth order forward linear predictor
% 
%       Xp(n) = -A(2)*X(n-1) - A(3)*X(n-2) - ... - A(N+1)*X(n-N)
% 
%    such that the sum of the squares of the errors
% 
%       err(n) = X(n) - Xp(n)
% 
%    is minimized.  X can be a vector or a matrix.  If X is a matrix
%    containing a separate signal in each column, LPC returns a model
%    estimate for each column in the rows of A. N specifies the order
%    of the polynomial A(z).
% 
%    If you do not specify a value for N, LPC uses a default N = length(X)-1.
% 
%    In calculating the linear prediction coefficients the same Yule-Walker
%    equations are solved as in the auto regressive modeling problem via the
%    Yule-Walker method.  Hence, the vector A above contains the same
%    polynomial coefficients as the polynomial coefficients calculated via
%    the Yule-Walker method.
% 
%                         const
%        ---------------------------------------
%          1 + A(2)z^(-1) + ... + A(N+1)z^(-N)
% 
%    is an auto-regressive model of the moving-average filter
% 
%       X(1) + X(2)z^(-1) + ... + X(M)z^(-M+1)
% 
%    where M=length(X).
% 
%    

function lsf2poly
%MATLAB Tour Partial Function Help:  sig_con
%
% LSF2POLY  Line spectral frequencies to prediction polynomial.
%    A = LSF2POLY(L) returns the prediction polynomial, A, based on the line
%    spectral frequencies, L. 
% 
%    

function poly2ac
%MATLAB Tour Partial Function Help:  sig_con
%
% POLY2AC  Convert prediction polynomial to autocorrelation sequence.
%    R=POLY2AC(A,Efinal) returns the autocorrelation sequence, R, based on
%    the prediction polynomial, A, and the final prediction error, Efinal. 
% 
%    If A(1) is not equal to 1, POLY2AC normalizes the prediction
%    polynomial by A(1).
% 
%    

function poly2lsf
%MATLAB Tour Partial Function Help:  sig_con
%
% POLY2LSF Prediction polynomial to line spectral frequencies.
%    LSF = POLY2LSF(A) converts the prediction polynomial specified by A,
%    into the corresponding line spectral frequencies, LSF. 
% 
%    POLY2LSF normalizes the prediction polynomial by A(1).
% 
%    

function poly2rc
%MATLAB Tour Partial Function Help:  sig_con
%
% POLY2RC  Convert prediction polynomial to reflection coefficients. 
%    K = POLY2RC(A) returns the reflection coefficients, K, based on the 
%    prediction polynomial, A.
% 
%    If A(1) is not equal to 1, POLY2RC normalizes the prediction
%    polynomial by A(1).
% 
%    [K,R0] = POLY2RC(A,Efinal) returns the zero lag autocorrelation, R0, 
%    based on the final prediction error, Efinal. 
% 
%    

function rc2ac
%MATLAB Tour Partial Function Help:  sig_con
%
% RC2AC  reflection coefficients to autocorrelation sequence.
%    R = RC2AC(K,R0) returns the autocorrelation sequence, R, based on the 
%    reflection coefficients, K, and the zero lag autocorrelation, R0.
%    R is a vector that contains the auotcorrelation samples at lags
%    0,1,2,...,P, where P is the length of K.
% 
%    

function rc2is
%MATLAB Tour Partial Function Help:  sig_con
%
% RC2IS Convert reflection coefficients to inverse sine parameters.
%    INV_SIN = RC2IS(K) returns the inverse sine parameters corresponding 
%    to the reflection coefficients, K.
% 
%    

function rc2lar
%MATLAB Tour Partial Function Help:  sig_con
%
% RC2LAR Convert reflection coefficients to log area ratios.
%    G = RC2LAR(K) returns the log area ratios corresponding to the reflection
%    coefficients, K.
% 
%    The log area ratio is defined by G = log((1+k)/(1-k)) , where the K is the
%    reflection coefficient.
% 
%    

function rc2poly
%MATLAB Tour Partial Function Help:  sig_con
%
% RC2POLY Convert reflection coefficients to prediction polynomial.
%    A = RC2POLY(K) computes the prediction polynomial, A, based on the
%    reflection coefficients, K.
% 
%    [A,Efinal] = RC2POLY(K,R0) returns the final prediction error, Efinal, 
%    based on the zero lag autocorrelation, R0.
% 
%    

function rlevinson
%MATLAB Tour Partial Function Help:  sig_con
%
% RLEVINSON  Reverse Levinson-Durbin Recursion.
%    R=RLEVINSON(A,Efinal) computes the autocorrelation coefficients, R based   
%    on the prediction polynomial A and the final prediction error Efinal,  
%    using the stepdown algorithm. A should be a minimum phase polynomial
%    and A(1) is assumed to be unity. 
% 
%    [R,U]=RLEVINSON(...) returns a (P+1)x(P+1) upper triangular matrix, U, 
%    that holds the i'th order prediction polynomials Ai, i=1:P, where P 
%    is the order of the input polynomial, A.
%    
%    The format of this matrix U, is:
% 
%          [ 1  a1(1)*  a2(2)* ..... aP(P)  * ]
%          [ 0  1       a2(1)* ..... aP(P-1)* ]
%    U  =  [ .................................]
%          [ 0  0       0      ..... 1        ]
% 
%    from which the i'th order prediction polynomial can be extracted  
%    using Ai=U(i+1:-1:1,i+1)'. The first row of U contains the 
%    conjugates of the reflection coefficients, and the K's may be
%    extracted using, K=conj(U(1,2:end)). 
% 
%    [R,U,K]=RLEVINSON(...) returns the reflection coefficients in K. 
%    [R,U,K,E]=RLEVINSON(...) returns the prediction error of descending
%    orders P,P-1,...,1 in the vector E.
% 
%    

function chirp
%MATLAB Tour Partial Function Help:  sig_con
%
% CHIRP  Swept-frequency cosine generator.
%    Y = CHIRP(T,F0,T1,F1) generates samples of a linear swept-frequency
%    signal at the time instances defined in array T.  The instantaneous
%    frequency at time 0 is F0 Hertz.  The instantaneous frequency F1
%    is achieved at time T1.  By default, F0=0, T1=1, and F1=100.
% 
%    Y = CHIRP(T,F0,T1,F1,'method') specifies alternate sweep methods.
%    Available methods are 'linear','quadratic', and 'logarithmic'; the
%    default is 'linear'.  Note that for a log-sweep, F1>F0 is required.
% 
%    Y = CHIRP(T,F0,T1,F1,'method', PHI) allows an initial phase PHI to
%    be specified in degrees.  By default, PHI=0.
% 
%    Default values are substituted for empty or omitted trailing input
%    arguments.
% 
%    EXAMPLE 1: Compute the spectrogram of a linear chirp.
%      t=0:0.001:2;                 % 2 secs @ 1kHz sample rate
%      y=chirp(t,0,1,150);          % Start @ DC, cross 150Hz at t=1sec 
%      specgram(y,256,1E3,256,250); % Display the spectrogram
% 
%    EXAMPLE 2: Compute the spectrogram of a quadratic chirp.
%      t=-2:0.001:2;                % +/-2 secs @ 1kHz sample rate
%      y=chirp(t,100,1,200,'q');    % Start @ 100Hz, cross 200Hz at t=1sec 
%      specgram(y,128,1E3,128,120); % Display the spectrogram
% 
%    

function diric
%MATLAB Tour Partial Function Help:  sig_con
%
% DIRIC	Dirichlet, or periodic sinc function
%    Y = DIRIC(X,N) returns a matrix the same size as X whose elements
%    are the Dirichlet function of the elements of X.  Positive integer
%    N is the number of equally spaced extrema of the function in the 
%    interval 0 to 2*pi. 
% 
%    The Dirichlet function is defined as
%        d(x) = sin(N*x/2)./(N*sin(x/2))   for x not a multiple of 2*pi
%               +1 or -1 for x a multiple of 2*pi. (depending on limit)

function gauspuls
%MATLAB Tour Partial Function Help:  sig_con
%
% GAUSPULS Gaussian-modulated sinusoidal pulse generator.
%    YI=GAUSPULS(T,FC,BW) returns samples of the unity-amplitude
%    Gaussian RF pulse with center frequency FC (Hertz) and
%    fractional bandwidth BW, at the times indicated in array T.
%    Note that BW must be > 0.  By default, FC=1000 Hz and BW=0.5.
% 
%    YI=GAUSPULS(T,FC,BW,BWR) specifies the optional fractional
%    bandwidth reference level, BWR.  The pulse bandwidth is
%    100*BW percent as measured at a level of BWR dB with respect
%    to the normalized signal peak.  By default, BWR=-6 dB.  Note that
%    BWR must be < 0, as it must always indicate a reference level less
%    than the peak (unity) envelope amplitude.
% 
%    [YI,YQ]=GAUSPULS(...) returns both the in-phase and quadrature
%    pulses.  [YI,YQ,YE]=GAUSPULS(...) returns the RF signal envelope.
% 
%    TC=GAUSPULS('cutoff',FC,BW,BWR,TPE) returns the cutoff time TC >= 0
%    at which the trailing pulse envelope falls below TPE dB with
%    respect to the peak envelope amplitude.  By default, TPE=-60 dB.
%    Note that TPE must be < 0 for the same reason as given for BWR.
% 
%    Default values are substituted for empty or omitted trailing input
%    arguments.
% 
%    For example, plot a 50 kHz Gaussian RF pulse with 60% bandwidth and
%    sampled at a rate of 1 MHz.  Truncate the pulse where the envelope
%    falls 40 dB below the peak.
%        tc = gauspuls('cutoff',50E3,.6,[],-40);
%        t  = -tc : 1E-6 : tc;
%        yi = gauspuls(t,50E3,.6); plot(t,yi)
% 
%    

function pulstran
%MATLAB Tour Partial Function Help:  sig_con
%
% PULSTRAN Pulse train generator.
%    PULSTRAN generates pulse trains from either continuous functions
%    or sampled prototype pulses.
% 
%    CONTINUOUS FUNCTIONS
%    Y=PULSTRAN(T,D,'func') generates a pulse train based on samples of
%    a continuous function, 'func'.  The function is evaluated over
%    the range of argument values specified in array T, after removing
%    a scalar argument offset taken from the vector D.  Thus, the
%    function is evaluated length(D) times, and the sum of the
%    evaluations Y = func(t-D(1)) + func(t-D(2)) + ... is returned.
%    Note that 'func' must be a vectorized function which can take an
%    array T as an argument.
% 
%    An optional gain factor may be applied to each delayed evaluation
%    by specifying D as a 2-column matrix, with the offset defined in
%    column 1 and associated gain in column 2 of D.  Note that a row
%    vector will be interpreted as specifying argument delays only.
% 
%    PULSTRAN(T,D,'func',P1,P2,...) allows additional parameters to be
%    passed to 'func' as necessary, e.g., the function is called as
%    func( T-D(1), P1, P2, ... ), etc.
% 
%    SAMPLED PROTOTYPE PULSES
%    PULSTRAN(T,D,P,FS) generates a pulse train consisting of the sum
%    of multiple delayed interpolations of the prototype pulse
%    specified in vector P sampled at the rate FS.  T and D are defined
%    as above.  It is assumed that P spans the time interval [0,
%    (length(P)-1)/FS], and its samples are identically zero outside
%    this interval.  By default, linear interpolation is used for
%    generating delays.
% 
%    PULSTRAN(T,D,P) assumes that FS=1 Hz, and PULSTRAN(..., 'method')
%    specifies alternative interpolation methods.  See INTERP1 for a
%    list of available methods.
% 
%    EXAMPLES
%    Example 1: Generate an asymmetric sawtooth waveform with a
%    repetition frequency of 3 Hz and a sawtooth width of 0.1 sec.
%    The signal is to be 1 second long with a sample rate of 1kHz.
%               T = 0 : 1/1E3 : 1;  % 1 kHz sample freq for 1 sec
%               D = 0 : 1/3 : 1;    % 3 Hz repetition freq
%               Y = pulstran(T,D,'tripuls',0.1,-1); plot(T,Y)
% 
%    Example 2: Generate a periodic Gaussian pulse signal at 10 kHz,
%    with 50% bandwidth.  The pulse repetition frequency is 1 kHz,
%    sample rate is 50 kHz, and pulse train length is 10msec.  The
%    repetition amplitude should attenuate by 0.8 each time.
%                T = 0 : 1/50E3 : 10E-3;
%                D = [0 : 1/1E3 : 10E-3 ; 0.8.^(0:10)]';
%                Y = pulstran(T,D,'gauspuls',10E3,.5); plot(T,Y)
% 
%    Example 3: Generate a train of 10 Rayleigh pulses:
%               (Requires Statistics Toolbox)
%                P = raylpdf((0:31)/5,1.5);  % ALT: P=hamming(32)
%                T = 0:320;
%                D = (0:9)'*32;
%                Y = pulstran(T,D,P); plot(T,Y)
% 
%    

function rectpuls
%MATLAB Tour Partial Function Help:  sig_con
%
% RECTPULS Sampled aperiodic rectangle generator.
%    RECTPULS(T) generates samples of a continuous, aperiodic,
%    unity-height rectangle at the points specified in array T, centered
%    about T=0.  By default, the rectangle has width 1.  Note that the
%    interval of non-zero amplitude is defined to be open on the right,
%    i.e., RECTPULS(-0.5)=1 while RECTPULS(0.5)=0.
% 
%    RECTPULS(T,W) generates a rectangle of width W.
% 
%    

function sawtooth
%MATLAB Tour Partial Function Help:  sig_con
%
% SAWTOOTH Sawtooth and triangle wave generation.
%    SAWTOOTH(T) generates a sawtooth wave with period 2*pi for the
%    elements of time vector T.  SAWTOOTH(T) is like SIN(T), only
%    it creates a sawtooth wave with peaks of +1 to -1 instead of
%    a sine wave.
% 
%    SAWTOOTH(T,WIDTH) generates a modified triangle wave where WIDTH, a
%    scalar parameter between 0 and 1, determines the fraction between 0
%    and 2*pi at which the maximum occurs. The function increases from -1
%    to 1 on the interval 0 to WIDTH*2*pi, then decreases linearly from 1
%    back to -1 on the interval WIDTH*2*pi to 2*pi. Thus WIDTH = .5 gives
%    you a triangle wave, symmetric about time instant pi with peak amplitude
%    of one.  SAWTOOTH(T,1) is equivalent to SAWTOOTH(T).
% 
%    Caution: this function is inaccurate for huge numerical inputs
% 
%    

function sinc
%MATLAB Tour Partial Function Help:  sig_con
%
% SINC Sin(pi*x)/(pi*x) function.
%    SINC(X) returns a matrix whose elements are the sinc of the elements 
%    of X, i.e.
%         y = sin(pi*x)/(pi*x)    if x ~= 0
%           = 1                   if x == 0
%    where x is an element of the input matrix and y is the resultant
%    output element.
% 
%    

function square
%MATLAB Tour Partial Function Help:  sig_con
%
% SQUARE Square wave generation.
%    SQUARE(T) generates a square wave with period 2*Pi for the
%    elements of time vector T.  SQUARE(T) is like SIN(T), only
%    it creates a square wave with peaks of +1 to -1 instead of
%    a sine wave.
%    SQUARE(T,DUTY) generates a square wave with specified duty
%    cycle. The duty cycle, DUTY, is the percent of the period
%    in which the signal is positive.
% 
%    For example, generate a 30 Hz square wave:
%         t = 0:.0001:.0625;
%         y = SQUARE(2*pi*30*t);, plot(t,y)
% 
%    

function tripuls
%MATLAB Tour Partial Function Help:  sig_con
%
% TRIPULS Sampled aperiodic triangle generator.
%    TRIPULS(T) generates samples of a continuous, aperiodic,
%    unity-height triangle at the points specified in array T, centered
%    about T=0.  By default, the triangle is symmetric and has width 1.
% 
%    TRIPULS(T,W) generates a triangle of width W.
% 
%    TRIPULS(T,W,S) allows the triangle skew S to be adjusted.  The
%    skew parameter must be in the range -1 < S < +1, where 0 generates
%    a symmetric triangle.
% 
%    

function auread
%MATLAB Tour Partial Function Help:  sig_con
%
% AUREAD Read NeXT/SUN (".au") sound file.
%    Y=AUREAD(AUFILE) loads a sound file specified by the string AUFILE,
%    returning the sampled data in y. The ".au" extension is appended
%    if no extension is given.  Amplitude values are in the range [-1,+1].
%    Supports multi-channel data in the following formats:
%    8-bit mu-law, 8-, 16-, and 32-bit linear, and floating point.
% 
%    [Y,Fs,BITS]=AUREAD(AUFILE) returns the sample rate (Fs) in Hertz
%    and the number of bits per sample (BITS) used to encode the
%    data in the file.
% 
%    [...]=AUREAD(AUFILE,N) returns only the first N samples from each
%        channel in the file.
%    [...]=AUREAD(AUFILE,[N1 N2]) returns only samples N1 through N2 from
%        each channel in the file.
%    SIZ=AUREAD(AUFILE,'size') returns the size of the audio data contained
%        in the file in place of the actual audio data, returning the
%        vector SIZ=[samples channels].
% 
%    

function auwrite
%MATLAB Tour Partial Function Help:  sig_con
%
% AUWRITE Write NeXT/SUN (".au") sound file.
%    AUWRITE(Y,AUFILE) writes a sound file specified by the
%    string AUFILE.  The data should be arranged with one channel
%    per column.  Amplitude values outside the range [-1,+1] are
%    clipped prior to writing. 
% 
%    Supports multi-channel data for 8-bit mu-law, and 8- and
%    16-bit linear formats:
% 
%    AUWRITE(Y,Fs,AUFILE) specifies the sample rate of the data
%    in Hertz.
% 
%    AUWRITE(Y,Fs,BITS,AUFILE) selects the number of bits in
%    the encoder.  Allowable settings are BITS=8 and BITS=16.
% 
%    AUWRITE(Y,Fs,BITS,METHOD,AUFILE) allows selection of the
%    encoding method, which can be either 'mu' or 'linear'.
%    Note that mu-law files must be 8-bit. By default, method='mu'.
% 
%    

function sound
%MATLAB Tour Partial Function Help:  sig_con
%
% SOUND Play vector as sound.
%    SOUND(Y,FS) sends the signal in vector Y (with sample frequency
%    FS) out to the speaker on platforms that support sound. Values in
%    Y are assumed to be in the range -1.0 <= y <= 1.0. Values outside
%    that range are clipped.  Stereo sounds are played, on platforms
%    that support it, when Y is an N-by-2 matrix.
% 
%    SOUND(Y) plays the sound at the default sample rate of 8192 Hz.
% 
%    SOUND(Y,FS,BITS) plays the sound using BITS bits/sample if
%    possible.  Most platforms support BITS=8 or 16.
% 
%    

function soundsc
%MATLAB Tour Partial Function Help:  sig_con
%
% SOUNDSC Autoscale and play vector as sound.
%    SOUNDSC(Y,...) is the same as SOUND(Y,...) except the data is
%    scaled so that the sound is played as loud as possible without
%    clipping.  
% 
%    SOUNDSC(Y,...,SLIM) where SLIM = [SLOW SHIGH] maps the values in Y
%    between SLOW and SHIGH to the full sound range.  The default
%    value is SLIM = [MIN(Y) MAX(Y)].
% 
%    

function wavplay
%MATLAB Tour Partial Function Help:  sig_con
%
% WAVPLAY Play sound using Windows audio output device.
%    WAVPLAY(Y,FS) sends the signal in vector Y with sample frequency
%    of FS Hertz to the Windows WAVE audio device.  Standard audio
%    rates are 8000, 11025, 22050, and 44100 Hz.
%    WAVPLAY(Y) automatically sets the sample rate to 11025 Hz.
%    For stereo playback, Y should be an N-by-2 matrix.
% 
%    Y must contain audio samples stored in double, int16, or uint8
%    matrices.  Double precision data samples must be in the range
%    -1.0 <= y <= 1.0; values outside that range are clipped.
%    Supported data types and the corresponding number of bits per
%    sample used for playback in each format are as follows:
%         DTYPE     bits/sample
%        'double'      16
%        'int16'       16
%        'uint8'        8
% 
%    This function is only for use with Windows 95/98/NT machines.
% 
%    Example: Record and play back 5 seconds of 16-bit audio
%             sampled at 11.025 kHz.
%        Fs = 11025;
%        y  = wavrecord(5*Fs, Fs, 'int16');
%        wavplay(y, Fs);
% 
%    

function wavread
%MATLAB Tour Partial Function Help:  sig_con
%
% WAVREAD Read Microsoft WAVE (".wav") sound file.
%    Y=WAVREAD(FILE) reads a WAVE file specified by the string FILE,
%    returning the sampled data in Y. The ".wav" extension is appended
%    if no extension is given.  Amplitude values are in the range [-1,+1].
% 
%    [Y,FS,NBITS]=WAVREAD(FILE) returns the sample rate (FS) in Hertz
%    and the number of bits per sample (NBITS) used to encode the
%    data in the file.
% 
%    [...]=WAVREAD(FILE,N) returns only the first N samples from each
%        channel in the file.
%    [...]=WAVREAD(FILE,[N1 N2]) returns only samples N1 through N2 from
%        each channel in the file.
%    SIZ=WAVREAD(FILE,'size') returns the size of the audio data contained
%        in the file in place of the actual audio data, returning the
%        vector SIZ=[samples channels].
% 
%    [Y,FS,NBITS,OPTS]=WAVREAD(...) returns a structure OPTS of additional
%        information contained in the WAV file.  The content of this
%        structure differs from file to file.  Typical structure fields
%        include '.fmt' (audio format information) and '.info' (text
%        which may describe subject title, copyright, etc.)
% 
%    Supports multi-channel data, with up to 16 bits per sample.
% 
%    

function wavrecord
%MATLAB Tour Partial Function Help:  sig_con
%
% WAVRECORD Record sound using Windows audio input device.
%    WAVRECORD(N,FS,CH) records N audio samples at FS Hertz from
%    CH number of input channels from the Windows WAVE audio device.
%    Standard audio rates are 8000, 11025, 22050, and 44100 Hz.
%    Samples are returned in a matrix of size N x CH.  If not
%    specified, FS=11025 Hz, and CH=1.
% 
%    WAVRECORD(..., DTYPE) records and returns data using the data type
%    specified by DTYPE.  Supported data types and the corresponding
%    number of bits per sample recorded in each format are as follows:
%         DTYPE     bits/sample
%        'double'      16
%        'int16'       16
%        'uint8'        8
% 
%    This function is only for use with Windows 95/98/NT machines.
% 
%    Example: Record and play back 5 seconds of 16-bit audio
%             sampled at 11.025 kHz.
%        Fs = 11025;
%        y  = wavrecord(5*Fs, Fs, 'int16');
%        wavplay(y, Fs);
% 
%    

function wavwrite
%MATLAB Tour Partial Function Help:  sig_con
%
% WAVWRITE Write Microsoft WAVE (".wav") sound file.
%    WAVWRITE(Y,FS,NBITS,WAVEFILE) writes data Y to a Windows WAVE
%    file specified by the file name WAVEFILE, with a sample rate
%    of FS Hz and with NBITS number of bits.  NBITS must be 8 or 16.
%    Stereo data should be specified as a matrix with two columns.
%    Amplitude values outside the range [-1,+1] are clipped.
% 
%    WAVWRITE(Y,FS,WAVEFILE) assumes NBITS=16 bits.
%    WAVWRITE(Y,WAVEFILE) assumes NBITS=16 bits and FS=8000 Hz.
% 
%    

function cceps
%MATLAB Tour Partial Function Help:  sig_con
%
% CCEPS Complex cepstrum.
%    CCEPS(x) returns the complex cepstrum of the (assumed real) sequence x.
%    The input is altered to have no phase discontinuity at +/- pi radians
%    by the application of a linear phase term (that is, it is circularly
%    shifted (after zero-padding) by some samples if necessary to have zero 
%    phase at pi radians).
% 
%    [xhat,nd] = CCEPS(x) returns the number of samples nd of (circular)
%    delay added to x prior to finding the complex cepstrum.
% 
%    [xhat,nd,xhat1] = CCEPS(x) returns the complex cepstrum in XHAT1 using 
%    an alternate rooting algorithm. XHAT1 can be used to verify XHAT for 
%    short sequences that can be rooted and do not have zeros on the unit circle.
% 
%    CCEPS(x,n) zero-pads x to length n, and returns the length
%    n complex cepstrum of x.
% 
%    

function decimate
%MATLAB Tour Partial Function Help:  sig_con
%
% DECIMATE Resample data at a lower rate after lowpass filtering.
%    Y = DECIMATE(X,R) resamples the sequence in vector X at 1/R times the 
%    original sample rate.  The resulting resampled vector Y is R times shorter,
%    LENGTH(Y) = LENGTH(X)/R.
%    DECIMATE filters the data with an eighth order Chebyshev type I lowpass 
%    filter with cutoff frequency .8*(Fs/2)/R, before resampling.
%    Y = DECIMATE(X,R,N) uses an N'th order Chebyshev filter.
%    Y = DECIMATE(X,R,'FIR') uses the 30 point FIR filter generated by 
%    FIR1(30,1/R) to filter the data.
%    Y = DECIMATE(X,R,N,'FIR') uses the N-point FIR filter.
% 
%    Note: For large R, the Chebyshev filter design might be incorrect
%    due to numeric precision limitations.  In this case, DECIMATE will
%    use a lower filter order.  For better anti-aliasing performance, try 
%    breaking R up into its factors and calling DECIMATE several times.
% 
%    

function deconv
%MATLAB Tour Partial Function Help:  sig_con
%
% DECONV Deconvolution and polynomial division.
%    [Q,R] = DECONV(B,A) deconvolves vector A out of vector B.  The result
%    is returned in vector Q and the remainder in vector R such that
%    B = conv(A,Q) + R.
% 
%    If A and B are vectors of polynomial coefficients, deconvolution
%    is equivalent to polynomial division.  The result of dividing B by
%    A is quotient Q and remainder R.
% 
%    

function demod
%MATLAB Tour Partial Function Help:  sig_con
%
% DEMOD Signal demodulation for communications simulations.
%    X = DEMOD(Y,Fc,Fs,METHOD,OPT) demodulates the carrier signal Y with a 
%    carrier frequency Fc and sampling frequency Fs, using the demodulation
%    scheme in METHOD.  OPT is an extra, sometimes optional, parameter whose
%    purpose depends on the demodulation scheme you choose.
% 
%         METHOD            DEMODULATION SCHEME
%     'am',      Amplitude demodulation, double side-band, suppressed carrier
%     'amdsb-sc' OPT not used.
%     'amdsb-tc' Amplitude demodulation, double side-band,transmitted carrier
%                OPT is a scalar which is subtracted from the decoded message
%                signal.  It defaults to zero.
%     'amssb'    Amplitude demodulation, single side-band
%                OPT not used.
%     'fm'       Frequency demodulation
%                OPT is a scalar which specifies the constant of frequency 
%                modulation kf, which defaults to 1.
%     'pm'       Phase demodulation
%                OPT is a scalar which specifies the constant of phase 
%                modulation kp, which defaults to 1.
%     'pwm'      Pulse width demodulation
%                By setting OPT = 'centered' you tell DEMOD that the pulses 
%                are centered on the carrier period rather than being 
%                "left justified".
%     'ptm'      Pulse time demodulation
%                OPT is not used.
%     'qam'      Quadrature amplitude demodulation
%                For QAM signals, use [X1,X2] = DEMOD(Y,Fc,Fs,'qam')
% 
%    If Y is a matrix, its columns are demodulated.
% 
%    

function dpss
%MATLAB Tour Partial Function Help:  sig_con
%
% DPSS Discrete prolate spheroidal sequences (Slepian sequences).
%    [E,V] = DPSS(N,NW) are the first 2*NW discrete prolate spheroidal sequences
%    (DPSSs, or Slepian sequences) of length N (in the columns of E) and 
%    their corresponding concentrations (in vector V) in the frequency band 
%    |w|<=(2*pi*W) (where  W = NW/N is the half-bandwidth and w is in radians). 
%    E(:,1) is the length N signal most concentrated in the frequency band 
%    |w|<=(2*pi*W) radians, E(:,2) is the signal orthogonal to E(:,1) which 
%    is most concentrated in this band, E(:,3) is the signal orthogonal to 
%    both E(:,1) and E(:,2) which is most concentrated in this band, etc.  
% 
%    For multi-taper spectral analysis, typical choices for NW are 2, 5/2, 3, 
%    7/2, or 4.
% 
%    [E,V] = DPSS(N,NW,K) are the K most band-limited discrete prolate spheroidal
%    sequences.  [E,V] = DPSS(N,NW,[K1 K2]) returns the K1-th through the 
%    K2-th sequences.
% 
%    [E,V] = DPSS(N,NW,'spline') uses spline interpolation to compute the DPSSs 
%    from existing DPSSs in the DPSS database with length closest to N.
%    [E,V] = DPSS(N,NW,'spline',Ni) interpolates from existing length Ni DPSSs.
%    DPSS(N,NW,'linear') and DPSS(N,NW,'linear',Ni) use linear interpolation, 
%    which is much faster but less accurate than spline interpolation.  
%    'linear' requires Ni > N.
% 
%    Use a trailing 'trace' argument to find out which method DPSS uses, e.g.
%    DPSS(N,NW,'trace') or DPSS(N,NW,'int','trace').
% 
%    

function dpssclear
%MATLAB Tour Partial Function Help:  sig_con
%
% DPSSCLEAR  Remove discrete prolate spheroidal sequences from database.
%    DPSSCLEAR(N,NW) removes the DPSSs with length N and time-halfbandwidth 
%    product NW, from the DPSS MAT-file database, 'dpss.mat'.  
% 
%    

function dpssdir
%MATLAB Tour Partial Function Help:  sig_con
%
% DPSSDIR  Discrete prolate spheroidal sequence database directory.
%    DPSSDIR lists the directory of saved DPSSs in the file dpss.mat.
%    DPSSDIR(N) lists the DPSSs saved with length N.
%    DPSSDIR(NW,'NW') lists the DPSSs saved with time-halfbandwidth product NW.
%    DPSSDIR(N,NW) lists the DPSSs saved with length N and time-halfbandwidth 
%    product NW.
% 
%    INDEX = DPSSDIR is a structure array describing the DPSS database.
%    Pass N and NW options as for the no output case to get a filtered INDEX.
% 
%    

function dpssload
%MATLAB Tour Partial Function Help:  sig_con
%
% DPSSLOAD  Load discrete prolate spheroidal sequences from database.
%    [E,V] = DPSSLOAD(N,NW) are the  DPSSs E and their concentrations V, with 
%    length N and time-halfbandwidth product NW, as stored in the DPSS MAT-file 
%    database, 'dpss.mat'.  
% 
%    

function dpsssave
%MATLAB Tour Partial Function Help:  sig_con
%
% DPSSSAVE  Save discrete prolate spheroidal sequences in database.
%    DPSSSAVE(NW,E,V) saves the DPSSs in E and their concentrations V in the
%    DPSS MAT-file database, 'dpss.mat'.  The length N of the DPSSs is determined
%    by the number of rows of E, and NW is the "time-bandwidth product".
% 
%    STATUS = DPSSSAVE(NW,E,V) returns 0 if the save was successful and 1 if
%    there was some error.
% 
%    

function interp
%MATLAB Tour Partial Function Help:  sig_con
%
% INTERP Resample data at a higher rate using lowpass interpolation.
%    Y = INTERP(X,R) resamples the sequence in vector X at R times
%    the original sample rate.  The resulting resampled vector Y is
%    R times longer, LENGTH(Y) = R*LENGTH(X).
% 
%    A symmetric filter, B, allows the original data to pass through
%    unchanged and interpolates between so that the mean square error
%    between them and their ideal values is minimized.
%    Y = INTERP(X,R,L,ALPHA) allows specification of arguments
%    L and ALPHA which otherwise default to 4 and .5 respectively.
%    2*L is the number of original sample values used to perform the
%    interpolation.  Ideally L should be less than or equal to 10.
%    The length of B is 2*L*R+1. The signal is assumed to be band
%    limited with cutoff frequency 0 < ALPHA <= 1.0. 
%    [Y,B] = INTERP(X,R,L,ALPHA) returns the coefficients of the
%    interpolation filter B.  

function interp1
%MATLAB Tour Partial Function Help:  sig_con
%
% INTERP1 1-D interpolation (table lookup).
%    YI = INTERP1(X,Y,XI) interpolates to find YI, the values of
%    the underlying function Y at the points in the vector XI.
%    The vector X specifies the points at which the data Y is
%    given. If Y is a matrix, then the interpolation is performed
%    for each column of Y and YI will be length(XI)-by-size(Y,2).
%    Out of range values are returned as NaN. 
% 
%    YI = INTERP1(Y,XI) assumes X = 1:N, where N is the length(Y)
%    for vector Y or SIZE(Y,1) for matrix Y.
% 
%    Interpolation is the same operation as "table lookup".  Described in
%    "table lookup" terms, the "table" is [X,Y] and INTERP1 "looks-up"
%    the elements of XI in X, and, based upon their location, returns
%    values YI interpolated within the elements of Y.
% 
%    YI = INTERP1(X,Y,XI,'method') specifies alternate methods.
%    The default is linear interpolation.  Available methods are:
% 
%      'nearest' - nearest neighbor interpolation
%      'linear'  - linear interpolation
%      'spline'  - cubic spline interpolation
%      'cubic'   - cubic interpolation
% 
%    All the interpolation methods require that X be monotonic. X can be
%    non-uniformly spaced.  For faster interpolation when X is equally
%    spaced and monotonic, use the methods '*linear', '*cubic', '*nearest'. 
%    For faster linear interpolation when X is non-uniformly spaced 
%    see INTERP1Q.
% 
%    For example, generate a coarse sine curve and interpolate over a
%    finer abscissa:
%        x = 0:10; y = sin(x); xi = 0:.25:10;
%        yi = interp1(x,y,xi); plot(x,y,'o',xi,yi)
% 
%    

function medfilt1
%MATLAB Tour Partial Function Help:  sig_con
%
% MEDFILT1  One dimensional median filter.
%    Y = MEDFILT1(X,N) returns the output of the order N, one dimensional 
%    median filtering of vector X.  Y is the same length as X; for the edge
%    points, zeros are assumed to the left and right of X. 
% 
%    For N odd, Y(k) is the median of X( k-(N-1)/2 : k+(N-1)/2 ).
%    For N even, Y(k) is the median of X( k-N/2 : k+N/2-1 ).
% 
%    If you do not specify N, MEDFILT1 uses a default of N = 3.
% 
%    MEDFILT1(X,N,BLKSZ) uses a for-loop to compute BLKSZ ("block size") 
%    output samples at a time.  Use this option with BLKSZ << LENGTH(X) if 
%    you are low on memory (MEDFILT1 uses a working matrix of size
%    N x BLKSZ).  By default, BLKSZ == LENGTH(X); this is the fastest
%    execution if you have the memory for it.
% 
%    

function modulate
%MATLAB Tour Partial Function Help:  sig_con
%
% MODULATE  Signal modulation for communications simulations.
%    Y = MODULATE(X,Fc,Fs,METHOD,OPT) modulates the message signal X with a 
%    carrier frequency Fc and sampling frequency Fs, using the modulation
%    scheme in METHOD.  OPT is an extra sometimes optional parameter whose
%    purpose depends on the modulation scheme you choose.
% 
%         METHOD              MODULATION SCHEME
%     'am',      Amplitude modulation, double side-band, suppressed carrier
%     'amdsb-sc' OPT not used.
%     'amdsb-tc' Amplitude modulation, double side-band, transmitted carrier
%                OPT is a scalar which is subtracted from X prior to 
%                multiplication by the carrier cosine.  It defaults to
%                min(min(X)) so the offset message signal is positive and
%                has a minimum value of zero.
%     'amssb'    Amplitude modulation, single side-band
%                OPT not used.
%     'fm'       Frequency modulation
%                OPT is a scalar which specifies the constant of frequency 
%                modulation kf.  kf = (Fc/Fs)*2*pi/max(max(abs(X))) by 
%                default for a maximum frequency excursion of Fc Hertz.
%     'pm'       Phase modulation
%                OPT is a scalar which specifies the constant of phase 
%                modulation kp.  kp = pi/max(max(abs(x))) by default for a 
%                maximum phase excursion of +/-pi radians.
%     'pwm'      Pulse width modulation
%                If you let OPT = 'centered', the pulses are centered on the
%                carrier period rather than being "left justified".
%     'ptm'      Pulse time modulation
%                OPT is a scalar between 0 and 1 which specifies the pulse 
%                width in fractions of the carrier period. It defaults to .1.
%     'qam'      Quadrature amplitude modulation
%                OPT is a matrix the same size as X which is modulated in 
%                quadrature with X.
% 
%    If X is a matrix, its columns are modulated.
% 
%    [Y,T] = MODULATE(...) returns a time vector the same length as Y.
% 
%    

function rceps
%MATLAB Tour Partial Function Help:  sig_con
%
% RCEPS Real cepstrum.
%    RCEPS(x) returns the real cepstrum of the sequence x.
%    [xh, yh] = RCEPS(x) returns both the real cepstrum and a
%    minimum phase signal derived from x.
%    

function resample
%MATLAB Tour Partial Function Help:  sig_con
%
% RESAMPLE  Change the sampling rate of a signal.
%    Y = RESAMPLE(X,P,Q) resamples the sequence in vector X at P/Q times
%    the original sample rate using a polyphase implementation.  Y is P/Q 
%    times the length of X (or the ceiling of this if P/Q is not an integer).  
%    P and Q must be positive integers.
% 
%    RESAMPLE applies an anti-aliasing (lowpass) FIR filter to X during the 
%    resampling process, and compensates for the filter's delay.  The filter 
%    is designed using FIRLS.  RESAMPLE provides an easy-to-use alternative
%    to UPFIRDN, which does not require you to supply a filter or compensate
%    for the signal delay introduced by filtering.
% 
%    Y = RESAMPLE(X,P,Q,N) uses a weighted sum of 2*N*max(1,Q/P) samples of X 
%    to compute each sample of Y.  The length of the FIR filter RESAMPLE applies
%    is proportional to N; by increasing N you will get better accuracy at the 
%    expense of a longer computation time.  If you don't specify N, RESAMPLE uses
%    N = 10 by default.  If you let N = 0, RESAMPLE performs a nearest
%    neighbor interpolation; that is, the output Y(n) is X(round((n-1)*Q/P)+1)
%    ( Y(n) = 0 if round((n-1)*Q/P)+1 > length(X) ).
% 
%    Y = RESAMPLE(X,P,Q,N,BETA) uses BETA as the design parameter for the 
%    Kaiser window used to design the filter.  RESAMPLE uses BETA = 5 if
%    you don't specify a value.
% 
%    Y = RESAMPLE(X,P,Q,B) uses B to filter X (after upsampling) if B is a 
%    vector of filter coefficients.  RESAMPLE assumes B has odd length and
%    linear phase when compensating for the filter's delay; for even length 
%    filters, the delay is overcompensated by 1/2 sample.  For non-linear 
%    phase filters consider using UPFIRDN.
% 
%    [Y,B] = RESAMPLE(X,P,Q,...) returns in B the coefficients of the filter
%    applied to X during the resampling process (after upsampling).
% 
%    If X is a matrix, RESAMPLE resamples the columns of X.
% 
%    

function specgram
%MATLAB Tour Partial Function Help:  sig_con
%
% SPECGRAM Calculate spectrogram from signal.
%    B = SPECGRAM(A,NFFT,Fs,WINDOW,NOVERLAP) calculates the spectrogram for 
%    the signal in vector A.  SPECGRAM splits the signal into overlapping 
%    segments, windows each with the WINDOW vector and forms the columns of
%    B with their zero-padded, length NFFT discrete Fourier transforms.  Thus
%    each column of B contains an estimate of the short-term, time-localized
%    frequency content of the signal A.  Time increases linearly across the 
%    columns of B, from left to right.  Frequency increases linearly down 
%    the rows, starting at 0.  If A is a length NX complex signal, B is a 
%    complex matrix with NFFT rows and 
%         k = fix((NX-NOVERLAP)/(length(WINDOW)-NOVERLAP)) 
%    columns.  If A is real, B still has k columns but the higher frequency
%    components are truncated (because they are redundant); in that case,
%    SPECGRAM returns B with NFFT/2+1 rows for NFFT even and (NFFT+1)/2 rows 
%    for NFFT odd.  If you specify a scalar for WINDOW, SPECGRAM uses a 
%    Hanning window of that length.  WINDOW must have length smaller than
%    or equal to NFFT and greater than NOVERLAP.  NOVERLAP is the number of
%    samples the sections of A overlap.  Fs is the sampling frequency
%    which does not effect the spectrogram but is used for scaling plots.
% 
%    [B,F,T] = SPECGRAM(A,NFFT,Fs,WINDOW,NOVERLAP) returns a column of 
%    frequencies F and one of times T at which the spectrogram is computed.
%    F has length equal to the number of rows of B, T has length k. If you 
%    leave Fs unspecified, SPECGRAM assumes a default of 2 Hz.
% 
%    B = SPECGRAM(A) produces the spectrogram of the signal A using default
%    settings; the defaults are NFFT = minimum of 256 and the length of A, a
%    Hanning window of length NFFT, and NOVERLAP = length(WINDOW)/2.  You 
%    can tell SPECGRAM to use the default for any parameter by leaving it 
%    off or using [] for that parameter, e.g. SPECGRAM(A,[],1000)
% 
%    SPECGRAM with no output arguments plots the absolute value of the 
%    spectrogram in the current figure, using IMAGESC(T,F,20*log10(ABS(B))),
%    AXIS XY, COLORMAP(JET) so the low frequency content of the first 
%    portion of the signal is displayed in the lower left corner of the axes.
% 
%    SPECGRAM(A,F,Fs,WINDOW) where F is a vector of frequencies in Hz
%    (with 2 or more elements) computes the spectrogram at those frequencies
%    using either the chirp z-transform for more than 20 evenly spaced 
%    frequencies or a polyphase decimation filterbank.
% 
%    

function spline
%MATLAB Tour Partial Function Help:  sig_con
%
% SPLINE Cubic spline data interpolation.
%    YY = SPLINE(X,Y,XX) uses cubic spline interpolation
%    to find a vector YY corresponding to XX.  X and Y are the
%    given data vectors and XX is the new abscissa vector.
% 
%    The ordinates Y may be vector-valued, in which case Y(:,j) is
%    the j-th ordinate.
% 
%    PP = SPLINE(X,Y) returns the ppform of the cubic spline 
%    interpolant instead, for later use with  PPVAL, etc.
% 
%    Ordinarily, the not-a-knot end conditions are used. However, if
%    Y contains two more ordinates than X has entries, then the first
%    and last ordinate in Y are used as the endslopes for the cubic spline.
% 
%    Here's an example that generates a coarse sine curve, then
%    samples the spline over a finer mesh:
% 
%        x = 0:10;  y = sin(x);
%        xx = 0:.25:10;
%        yy = spline(x,y,xx);
%        plot(x,y,'o',xx,yy)
% 
%    Here is an example that features a vector-valued spline, along with complete
%    spline interpolation, i.e., fitting to given end slopes (instead of using
%    the not-a-knot end condition); it uses SPLINE to generate a circle:
% 
%        circle = spline( 0:4, [0 1 0 -1 0 1 0; pi/2 0 1 0 -1 0 pi/2] );
%        xx = 0:.1:4; cc = ppval(circle, xx); plot(cc(1,:), cc(2,:)), axis equal
% 
%    

function vco
%MATLAB Tour Partial Function Help:  sig_con
%
% VCO  Voltage controlled oscillator
%    Y = VCO(X,Fc,Fs) creates a signal which oscillates at a frequency
%    determined by the input vector X.  Fc is the carrier or reference 
%    frequency, and Fs is the sampling frequency; if you input 0 for X, 
%    Y will be a Fc Hertz cosine with amplitude 1 sampled at Fs Hertz.  
%    The range of values for X is from -1 to 1; -1 corresponds to a 0 
%    frequency output, 0 to Fc and 1 to 2*Fc.  Y is the same size as X.
% 
%    Y = VCO(X,[Fmin Fmax],Fs) scales the frequency modulation range so 
%    that -1 and 1 values of X yield oscillations of Fmin and Fmax 
%    Hertz respectively.  For best results, Fmin and Fmax should be in
%    the range 0 to Fs/2.
% 
%        If you do not specify either Fc or Fs, VCO uses the default values
%    Fs = 1 and Fc = Fs/4.
% 
%    If X is a matrix, VCO produces a matrix whose columns oscillate
%    according to the columns of X.
% 
%    

function besself
%MATLAB Tour Partial Function Help:  sig_con
%
% BESSELF  Bessel analog filter design.
%    [B,A] = BESSELF(N,Wn) designs an N'th order lowpass analog
%    Bessel filter and returns the filter coefficients in length
%    N+1 vectors B and A.  The cut-off frequency Wn must be
%    greater than 0.
% 
%    If Wn is a two-element vector, Wn = [W1 W2], BESSELF returns an 
%    order 2N bandpass filter with passband  W1 < W < W2.
%    [B,A] = BESSELF(N,Wn,'high') designs a highpass filter.
%    [B,A] = BESSELF(N,Wn,'stop') is a bandstop filter if Wn = [W1 W2].
%    
%    When used with three left-hand arguments, as in
%    [Z,P,K] = BESSELF(...), the zeros and poles are returned in
%    length N column vectors Z and P, and the gain in scalar K. 
% 
%    When used with four left-hand arguments, as in
%    [A,B,C,D] = BESSELF(...), state-space matrices are returned.
% 
%    

function buffer
%MATLAB Tour Partial Function Help:  sig_con
%
% BUFFER Buffer a signal vector into a matrix of data frames.
%   Y = BUFFER(X,N) partitions signal vector X into nonoverlapping data
%   segments (frames) of length N.  Each data frame occupies one
%   column in the output matrix, resulting in a matrix with N rows.
% 
%   Y = BUFFER(X,N,P) specifies an integer value P which controls the amount
%   of overlap or underlap in the buffered data frames.
%   - If P>0, there will be P samples of data from the end of one frame
%     (column) that will be repeated at the start of the next data frame.
%   - If P<0, the buffering operation will skip P samples of data after each
%     frame, effectively skipping over data in X, and thus reducing the
%     buffer "frame rate".
%   - If empty or omitted, P is assumed to be zero (no overlap or underlap).
% 
%   Y = BUFFER(X,N,P,OPT) specifies an optional parameter OPT used in the
%   case of overlap or underlap buffering.
%   - If P>0 (overlap), OPT specifies an initial condition vector with
%     length equal to the overlap, P.  If empty or omitted, the initial
%     condition is assumed to be zeros(P,1).  Alternatively, OPT can be
%     set to 'nodelay' which removes initial conditions from the output and
%     starts buffering at the first data sample in X.
%   - If P<0 (underlap), OPT specifies a scalar offset indicating the number
%     of initial data samples in X to skip.  The offset must be in the range
%     [0, -P], where P<0.  If empty or omitted, the offset is zero.
% 
%   Y = BUFFER(X, ...) returns a matrix of data frames, one frame per
%   column.  If X does not contain a multiple of (N-P) samples, zeros
%   will be appended to the last frame as needed.
% 
%   [Y,Z] = BUFFER(X, ...) forces Y to contain only complete frames of data,
%   and returns any remaining samples (i.e., a partial frame) in vector Z.
%   The orientation of vector Z will be the same as X.  Z will be an empty
%   vector if the length of X is a multiple of (N-P).
% 
%   [Y,Z,OPT] = BUFFER(X, ...) returns an options argument OPT which can
%   be used in the next call to BUFFER, and is primarily intended for use
%   in continuous buffering applications.
% 
% 
%   EXAMPLE: Buffering with overlap.
%       Buffer an entire signal vector into 8-sample frames,
%       each frame overlapping the previous one by 4 samples.
% 
%       x = 1:18;            % Example input data to be buffered
%       y = buffer(x, 8, 4); % Create overlapping buffer matrix
% 
%   EXAMPLE: Buffering with underlap.
%       Buffer an entire signal vector into 8-sample frames,
%       skipping 4 samples between frames.  Return any partial
%       buffer separately.
% 
%       x = 1:40;                 % Example input data to be buffered
%       [y,z] = buffer(x, 8, -4); % Return last partial frame in z

function conv2
%MATLAB Tour Partial Function Help:  sig_con
%
% CONV2 Two dimensional convolution.
%    C = CONV2(A, B) performs the 2-D convolution of matrices
%    A and B.   If [ma,na] = size(A) and [mb,nb] = size(B), then
%    size(C) = [ma+mb-1,na+nb-1].
%    C = CONV2(HCOL, HROW, A) convolves A separably with HCOL
%    in the column direction and HROW in the row direction.
%    HCOL and HROW should both be vectors.
% 
%    C = CONV2( ... ,'shape') returns a subsection of the 2-D
%    convolution with size specified by 'shape':
%      'full'  - (default) returns the full 2-D convolution,
%      'same'  - returns the central part of the convolution
%                that is the same size as A.
%      'valid' - returns only those parts of the convolution
%                that are computed without the zero-padded
%                edges, size(C) = [ma-mb+1,na-nb+1] when
%                size(A) > size(B).
%    CONV2 is fastest when size(A) > size(B).
% 
%    

function cplxpair
%MATLAB Tour Partial Function Help:  sig_con
%
% CPLXPAIR Sort numbers into complex conjugate pairs.
%    Y = CPLXPAIR(X) takes a vector of complex conjugate pairs and/or
%    real numbers.  CPLXPAIR rearranges the elements of X so that
%    complex numbers are collected into matched pairs of complex
%    conjugates.  The pairs are ordered by increasing real part.
%    Any purely real elements are placed after all the complex pairs.
%    Y = CPLXPAIR(X,TOL) uses a relative tolerance of TOL for
%    comparison purposes.  The default is TOL = 100*EPS.
% 
%    For X an N-D array, CPLXPAIR(X) and CPLXPAIR(X,TOL) rearranges
%    the elements along the first non-singleton dimension of X.
%    CPLXPAIR(X,[],DIM) and CPLXPAIR(X,TOL,DIM) sorts X along 
%    dimension DIM.

function fft2
%MATLAB Tour Partial Function Help:  sig_con
%
% FFT2 Two-dimensional discrete Fourier Transform.
%    FFT2(X) returns the two-dimensional Fourier transform of matrix X.
%    If X is a vector, the result will have the same orientation.
% 
%    FFT2(X,MROWS,NCOLS) pads matrix X with zeros to size MROWS-by-NCOLS
%    before transforming.
% 
%    

function ifft2
%MATLAB Tour Partial Function Help:  sig_con
%
% IFFT2 Two-dimensional inverse discrete Fourier transform.
%    IFFT2(F) returns the two-dimensional inverse Fourier transform
%    of matrix F.  If F is a vector, the result will have the same
%    orientation.
% 
%    IFFT2(F,MROWS,NCOLS) pads matrix F with zeros to size MROWS-by-NCOLS
%    before transforming.
% 
%    

function polystab
%MATLAB Tour Partial Function Help:  sig_con
%
% POLYSTAB Polynomial stabilization.
%    POLYSTAB(A), where A is a vector of polynomial coefficients,
%    stabilizes the polynomial with respect to the unit circle;
%    roots whose magnitudes are greater than one are reflected
%    inside the unit circle.

function seqperiod
%MATLAB Tour Partial Function Help:  sig_con
%
% SEQPERIOD Find minimum-length repeating sequence in a vector.
%  
%   P = SEQPERIOD(X) returns the index P of the sequence of samples
%   X(1:P) which is found to repeat (possibly multiple times) in
%   X(P+1:end).  P is the sample period of the repetitive sequence.
%   No intervening samples may be present between repetitions.  An
%   incomplete repetition is permitted at the end of X.  If no
%   repetition is found, the entire sequence X is returned as the
%   minimum-length sequence and hence P=length(X).
% 
%   [P,N] = SEQPERIOD(X) returns the number of repetitions N of the
%   sequence X(1:P) in X.  N will always be >= 1 and may be non-
%   integer valued.
% 
%   If X is a matrix or N-D array, the sequence period is determined
%   along the first non-singleton dimension of X.

function stem
%MATLAB Tour Partial Function Help:  sig_con
%
% STEM   Discrete sequence or "stem" plot.
%    STEM(Y) plots the data sequence Y as stems from the x axis
%    terminated with circles for the data value.
% 
%    STEM(X,Y) plots the data sequence Y at the values specfied
%    in X.
% 
%    STEM(...,'filled') produces a stem plot with filled markers.
% 
%    STEM(...,'LINESPEC') uses the linetype specifed for the stems and
%    markers.  See PLOT for possibilities.
% 
%    H = STEM(...) returns a vector of line handles.
% 
%    

function strips
%MATLAB Tour Partial Function Help:  sig_con
%
% STRIPS  Strip plot.
%    STRIPS(X) plots vector X in horizontal strips of length 250.
%    If X is a matrix, STRIPS(X) plots each column of X in horizontal
%    strips.  The left-most column (column 1) is the top horizontal strip.
% 
%    STRIPS(X,N) plots vector X in strips that are each N samples long.
% 
%    STRIPS(X,SD,Fs) plots vector X in horizontal strips of duration SD
%    seconds given sampling frequency of Fs samples per second.
% 
%    STRIPS(X,SD,Fs,SCALE) scales the vertical axes.
% 
%    If X is a matrix, STRIPS(X,N), STRIPS(X,SD,Fs), and STRIPS(X,SD,Fs,SCALE)
%    plot the different columns of X on the same strip plot.
% 
%    STRIPS ignores the imaginary part of X if it is complex.
% 
%    

function xcorr2
%MATLAB Tour Partial Function Help:  sig_con
%
% XCORR2 Two-dimensional cross-correlation.
%    XCORR2(A,B) computes the crosscorrelation of matrices A and B.
%    XCORR2(A) is the autocorrelation function.
% 
%    

function sptool
%MATLAB Tour Partial Function Help:  sig_con
%
% SPTOOL  Signal Processing Tool - Graphical User Interface.
%    SPTOOL opens the SPTool window which allows you to import,
%    analyze, and manipulate signals, filters, and spectra.
%    
%    Exporting Component Structures from SPTool via the Command Line
%    ---------------------------------------------------------------
%    The following commands export component structures from the
%    currently open SPTool.
% 
%    s = sptool('Signals') returns a structure array of all the signals.
%    f = sptool('Filters') returns a structure array of all the filters.
%    s = sptool('Spectra') returns a structure array of all the spectra.
% 
%    [s,ind] = sptool(...) returns an index vector indicating which
%    of the elements of s are currently selected in SPTool.
% 
%    s = sptool(...,0) returns only the currently selected objects.
% 
%    Creating and Loading Component Structures via the Command Line
%    --------------------------------------------------------------
%    struc = sptool('create',PARAMLIST) creates a component
%    structure, struc, (defined by PARAMLIST) in the workspace.
% 
%    sptool('load',struc) loads struc into SPTool; opens SPTool if
%    necessary.
% 
%    struc = sptool('load',PARAMLIST) loads the component structure
%    defined by PARAMLIST into SPTool; if an optional output argument is
%    specified, a component structure, struc, is created in the workspace.
% 
%    COMPONENT           PARAMLIST
%    ~~~~~~~~~           ~~~~~~~~~
%    SIGNALS:   COMPONENT_NAME,DATA,FS,LABEL
%    FILTERS:   COMPONENT_NAME,NUM,DEN,FS,LABEL
%    SPECTRA:   COMPONENT_NAME,DATA,F,LABEL
% 
%    PARAMETER DEFINITIONS
%    ~~~~~~~~~~~~~~~~~~~~~
%    COMPONENT_NAME - 'Signal', 'Filter', or 'Spectrum'; if omitted
%              COMPONENT_NAME defaults to 'Signal'.
%    DATA    - a vector of doubles representing a signal or a spectrum.
%    NUM,DEN - numerator and denominator coefficients of the filter's
%              response in transfer function form.
%    FS      - sampling frequency (OPTIONAL), defaults to 1.
%    F       - frequency vector; applies to spectrum components only.
%    LABEL   - a string specifying the variable name of the component
%              as it will appear in SPTool (OPTIONAL); defaults to one
%              of the following: 'sig', 'filt', or 'spec'.

function cztdemo
%MATLAB Tour Partial Function Help:  sig_con
%
% CZTDEMO Demonstrates the FFT and CZT in the Signal Processing Toolbox.

function filtdem
%MATLAB Tour Partial Function Help:  sig_con
%
%  FILTDEM  Filter design and filtering demo.
%    This demonstration designs a filter with the Signal Processing Toolbox
%    and applies it to a signal made up of harmonic components.  
% 
%    To see it run, type 'filtdem'. 
% 
%    

function filtdem2
%MATLAB Tour Partial Function Help:  sig_con
%
%  FILTDEM2  IIR Filter design demo.
%    This demonstration designs bandpass filters using the YULEWALK, BUTTER,
%    and CHEBY1 functions in the Signal Processing Toolbox
% 
%    To see it run, type 'filtdem2'. 
% 
%    

function filtdemo
%MATLAB Tour Partial Function Help:  sig_con
%
% FILTDEMO  Demonstrates filter design tools in the Signal Processing Toolbox.
% 
%    To start the demo, type "filtdemo".
% 
%    For more information, hit the "info" button once the demo is 
%    running.
% 
%    Once you've designed a filter that you like,
%       [b,a] = filtdemo('getfilt');
%    gives you the filter coefficients.
% 
%    

function moddemo
%MATLAB Tour Partial Function Help:  sig_con
%
% MODDEMO Demonstrates modulation and demodulation.
% 
%    

function phone
%MATLAB Tour Partial Function Help:  sig_con
%
% PHONE  Signal processing and the touch-tone phone.

function sgolaydemo
%MATLAB Tour Partial Function Help:  sig_con
%
% SGOLAYDEMO Demonstrates Savitzky-Golay filtering.
%    This GUI demonstrates the smoothing obtained        
%    with Savitzky-Golay filters on noisy ECG signals.  
%                                                       
%    Three plots are shown: The noisy ECG signal, 
%    the smoothed signal and the noiseless signal.              
%                                                       
%    The noise level can be changed with a slider                 
%    control. The Savitzky-Golay parameters can be      
%    varied; in particular the degree of the polynomial 
%    used to fit the data, and the frame size can be
%    changed.

function sigdemo1
%MATLAB Tour Partial Function Help:  sig_con
%
% SIGDEMO1 Interactive signal demo - 1 : DFT of a signal
%    Demonstrates MATLAB's graphic user interface using Handle Graphics
%    while illustrating some basic signal processing concepts, such as 
%    sampling, aliasing, and windowing.

function sigdemo2
%MATLAB Tour Partial Function Help:  sig_con
%
% SIGDEMO2 Interactive signal demo - 2 : continuous FT of a signal
%    Demonstrates MATLAB's graphic user interface using Handle Graphics
%    while illustrating basic Fourier transform (FT) properties,
%    including modulation.

function sosdemo
%MATLAB Tour Partial Function Help:  sig_con
%
% SOSDEMO Second Order Sections Demonstration for the Signal Processing Toolbox.

