how to use nested for loop by grabbing one column and subtracting another column.
2 ビュー (過去 30 日間)
回答 (1 件)
Roger Stafford 2018 年 3 月 29 日
編集済み: Roger Stafford 2018 年 3 月 29 日
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
[n,m] = size(z)
for j = 1:m-1