Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Index Exceed Marix Dimensions
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, I am trying to repopulate an input dialog box with answers the user previously put in. I am saving the file correctly but when I try and load the answers I am getting the error index exceed matrix dimensions. I think that it is a +1 or -1 error, can someone look at the code and help with debugging and give an explanation for this problem, thank you.
PrefFile = fullfile(prefdir, 'MyGUI.pref');
if exist(PrefFile, 'file')
FileData = load(PrefFile, '-MAT');
cell_FileData = struct2cell(FileData);
for i=1:NumQuest;
set(EditHandle(i),'String', cell_FileData{1,i});
NumQuest - 1;
end
end
1 件のコメント
Matt J
2013 年 7 月 12 日
Timothy Commented:
So my problem is in cell_FileData it is a 1 x X cell I don't think that it is stepping forward with the rest of the program is there a way to fix it?
回答 (2 件)
Matt J
2013 年 7 月 12 日
編集済み: Matt J
2013 年 7 月 12 日
Either cell_FileData is shorter than NumQuest or EditHandle is.
1 件のコメント
Matt J
2013 年 7 月 12 日
編集済み: Matt J
2013 年 7 月 12 日
cell_FileData it is a 1 x X cell I don't think that it is stepping forward with the rest of the program
If X<NumQuest there is nowhere for it to step forward. Are you sure your loop is supposed to run from 1 to NumQuest, or is it in fact supposed to go from 1 to X?
この質問は閉じられています。
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!