Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Problem with toolbox filter design?

Asked by Stefan Leiva on 15 Jun 2013

Hi everybody, I need help with disigning filters in matlab:

I was designed a bandpass filter in the toolbox and export it like an object to my workspace, then I tried to filter data with it using the comand filtfilt, the problem es that this comand don't recognize this filter as a matrix so when i use the follow linecommand: a11=filtfilt(Fil1,a1); i recived the follow error "Not enough input arguments". The Fs frecuency of the filter is 1000Hz, the Flowpass is 10Hz and the Fhighpass is 14Hz. Apass 1dB. Type Chebychev Type 1.

thanks

0 Comments

Stefan Leiva

Products

No products are associated with this question.

1 Answer

Answer by Wayne King on 15 Jun 2013
Edited by Wayne King on 15 Jun 2013

Assume that Fil1 is your filter object, if you enter

 class(Fil1)

does it return dfilt.df2sos?

If so, then depending on what version of MATLAB you are using, try:

out = filtfilt(Fil1.sosMatrix,Fil1.ScaleValues,a1); 

where a1 is your data.

If you have an older version of MATLAB where the above command does not work, write back.

7 Comments

Stefan Leiva on 16 Jun 2013

with your answer also have Nans, can I send you the folder with all my data?, I think it´s strange too. the link with data is https://www.dropbox.com/s/gtp3k9g5cygjpru/Puente%20San%20Luis%2001-P-012%20K14%2B378.zip. Thanks

Wayne King on 17 Jun 2013

Are you using the MathWorks' version of filtfilt()? If you enter

>>which filtfilt

what do you get returned?

Stefan Leiva on 17 Jun 2013

it is what it returns: C:\Program Files\MATLAB\R2008a\toolbox\signal\signal\filtfilt.m

Wayne King

Contact us