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:
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 Comments
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433805
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433805
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433806
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433806
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433874
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433874
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433906
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/327972-getting-error-while-implementing-filter-object#comment_433906
Sign in to comment.