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!