Your n value will be 1478, but in z(i,j+1) you have allowed the j+1 index to get as large as 1479 because you have "for j=1:1:n" and its maximum value should be only 1236. Hence the error message. You need to do
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
댓글 수: 1
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/391343-how-to-use-nested-for-loop-by-grabbing-one-column-and-subtracting-another-column#comment_550997
이 댓글에 대한 바로 가기 링크
https://kr.mathworks.com/matlabcentral/answers/391343-how-to-use-nested-for-loop-by-grabbing-one-column-and-subtracting-another-column#comment_550997
댓글을 달려면 로그인하십시오.