Array indices must be positive integers or logical values.
이전 댓글 표시
Why do i have this problem? Array indices must be positive integers or logical values.
Here is my code.
Thanks!

답변 (2개)
H(0) does not exist in MATLAB. Array indices start with 1.
And if inv(K-W^2*M) is a matrix, you cannot save it in a scalar H(W). You will have to use a cell array:
H{W} = inv(K-W^2*M)
Image Analyst
2023년 4월 4일
편집: Image Analyst
2023년 4월 4일
Try
for W = 0 : 500
H{W + 1} = inv(K-W^2*M);
end
See the FAQ for a thorough discussion:
카테고리
도움말 센터 및 File Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!