Chebyshev on Matlab Problem

Discussion in 'Programmer's Corner' started by tquiva, Mar 17, 2011.

  1. tquiva

    Thread Starter Member

    Oct 19, 2010
    176
    1
    Hi, could someone please help me with this error I keep receiving?

    My code is:

    Code ( (Unknown Language)):
    1. syms k w0;
    2. % Let filter be 1st order
    3. k=1;
    4. % Cutoff frequency - passes frequencies above 0.1
    5. w0=0.1;
    6. [n,d]=cheby1(k,w0,'high','s')
    I receive the error:
    ??? Error using ==> cheby1 at 41
    Wn must be a one or two element vector.

    Therefore, I changed w0 to a two element vector:

    Code ( (Unknown Language)):
    1. syms k w0;
    2. % Let filter be 1st order
    3. k=1;
    4. % Cutoff frequency - passes frequencies above 0.1
    5. w0=[0.1 0.9];
    6. [n,d]=cheby1(k,w0,'high','s')
    Yet, I still receive the exact same error. Does anyone know what the problem might be?
     
  2. guitarguy12387

    Active Member

    Apr 10, 2008
    359
    12
    Check the order of input arguments of cheby1(). You forgot to specify the passband ripple.
     
Loading...