In an assignment A(I) = B, the number of elements in B and I must be the same.
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Tom Lane
2013-7-11
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!