Getting Error while implementing Filter object.
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 3 Mar 2017
Could you include the commands you use to create the filter? Also, which version are you using?
Riyasat
le 3 Mar 2017
Walter Roberson
le 4 Mar 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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Filter Analysis dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!