Error: Index exceeds matrix dimensions.
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, Why do I get this message "Index exceeds matrix dimensions."??. At first I thought it was because that I named a variable with function name then I used "exist checkname " function to check and it gave me 0. So I'm still confused what might be the problem!
Code:
for k= 1: length(finalx); row3= ceil(finalx(k)*(10000+diffy3)); col3= ceil(finaly(k)*(10000+diffx3)); widthless= 3; widthmore=3; valuer3(k)= sum(B3((row3-widthless):(row3+widthmore),col3)); end figure(16) plot(finaly*(10000+diffx3),finalx*(10000+diffy3-widthless),'.g',... finaly*(10000+diffx3),finalx*(10000+diffy3+widthmore),'.r')
回答 (1 件)
Dishant Arora
2014 年 2 月 20 日
dbstop if error
try debugging your code using dbstop, it will tell when actually this error occurs.
2 件のコメント
Dishant Arora
2014 年 2 月 20 日
編集済み: Dishant Arora
2014 年 2 月 20 日
type that in your command window and then run your code.
dbstop if error
YourScriptName % or run it directly from the editorwindow
Check out for your loop variables in the workspace after that
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!