In an assignment A(I) = B, the number of elements in B and I must be the same.
1 view (last 30 days)
Show older comments
How to get rid of this error!! this is my code below for
for i = 18:-1:13
test=ff(i)
[B,A] = oct3dsgn(ff(i),Fs,N);
if narg
y = filter(B,A,x);
test=sum(y)
P(i) = sum(y.^2)/m;
3 Comments
Answers (1)
Tom Lane
on 11 Jul 2013
If the variable y is not a vector (if it is a matrix with more than 1 row and column), then sum(y.^2) is not a scalar. It looks like you are trying to assign it into a single element of P.
See Also
Categories
Find more on Logical 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!