Index in position 2 exceeds array bounds. Error in line 20
1 回表示 (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/254840/image.png)
3 件のコメント
回答 (2 件)
Vinai Datta Thatiparthi
2019 年 12 月 23 日
Hey Arup,
"Index in position 2 exceeds array bounds" indicates that there's a mismatch in array dimensions, you are probably trying to access a data point or memory that doesn't exist. You are probably trying to index into an array, but are using indices that exceed the size of the array.
Hope this helps!
0 件のコメント
Walter Roberson
2019 年 12 月 23 日
You are using fscanf() on a file you opened for writing ('w') When you opened the file for writing, the entire content of the file would have been deleted, so there is nothing left in it to read.
2 件のコメント
Walter Roberson
2019 年 12 月 24 日
It is difficult for us to debug without a copy of the code (not just an image of code) and enough data files to be able to run to the problem.
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!