Arrays have incompatible sizes for firpm() function.
Show older comments
I have two 1X15 arrays, included in the attached file.
There is a frequency array and response array.
If you plot(frequency,response), you should be able to visualize the function I am trying to fit.
First I define the variables "frequency" and "response" as the arrays attached.
frequency=[0.1, 0.2, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
response=[0.0342, 0.0744, .2451, .6944, 1.2715, 1.9350, 3.4740, 5.2542, 7.0560, 8.7253, 10.3268, 11.2043, 12.4141, 12.6797, 12.9498];
Next I try to fit a 5th order differential filter to this data:
coeff = firmpm(5,frequency,response,'differentiator');
The error response is "arrays have incompatible sizes for this operation
I am not aware of a size restriction on the arrays, am I missing something here?
Any insight into what could be wrong here?
Accepted Answer
More Answers (0)
Categories
Find more on Digital Filter Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!