Getting Error while implementing Filter object.
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 3 Mär. 2017
Could you include the commands you use to create the filter? Also, which version are you using?
Riyasat
am 3 Mär. 2017
Walter Roberson
am 4 Mär. 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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Filter Analysis finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!