Getting Error while implementing Filter object.
Mostrar comentarios más antiguos
Hello,
I am using the Digital Filter with properties. I have defined filt(1) as:
digitalFilter with properties:
Coefficients: [20x6 double]
Specifications:
FrequencyResponse: 'bandpass'
ImpulseResponse: 'iir'
SampleRate: 1000
PassbandFrequency1: 59.9000
PassbandRipple: 3
StopbandAttenuation2: 80
StopbandAttenuation1: 80
PassbandFrequency2: 60.0800
FilterOrder: 40
DesignMethod: 'ellip'
Similarly, I have other filters under filt object as filt(2), filt(3) upto filt(8) each at different frequencies.
Now, for some reason I get the error, when my program tries to run the line:
Q = filter(filt(1),x);
where, x is a 600000x1 column vector with only positive and negative real values (resembling a long sine wave)
The error that I get is:
Subscript indices must either be real positive integers or logicals.
Error in digitalFilter/filter (line 870)
y = obj.FilterFunction(obj.Coefficients,x);
Could anyone please point out the problem? Thanks a lot.
4 comentarios
Walter Roberson
el 3 de Mzo. de 2017
Could you include the commands you use to create the filter? Also, which version are you using?
Riyasat
el 3 de Mzo. de 2017
Walter Roberson
el 4 de Mzo. de 2017
I am not all that familiar with designfilt. It would be easier if you could give specific commands to create a filter that you have difficulty with, or if you were to attach the .mat that had the stored filters.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Filter Analysis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!