Error calculation is not working
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
w1 = 0.4762;
w2 = -0.2152;
for k= 2: size(B)
B(k)= A(k)*w1+A(k-1)*w2;
end
disp(y);
for j= 2:size(B)
e(j)= B(j)-(A(j)*w1+A(j-1)*w2);
end
e(e==0)= [];
disp(e)
Ok this is the code, while k loop is running smoothly it doesn't seem so, to obtain any result at j loop for e that holds for error. A and B matrixes are perfectly loaded. What am I doing wrong??
2 个评论
KSSV
2017-9-5
At the loop don't use size(B) ....either row or column dimensions which ever is required....YOu have not provided A and B....you didn't specify what is the error?
Floriane Madeleine Schreiber
2017-9-5
maybe you have to use 'length(B)' instead of 'size(B)' !
回答(0 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!