MATLAB: Why i’m getting this error

signal processing

this error : Subscripted assignment dimension mismatch.

Best Answer

This line
m(i,:) = a0 + ...
The LHS references 500 elements (because m has size 4x500), whereas the RHS has size 1x2500 (because t has size 1x2500). How do you expect to put 2500 elements into 500?