how i correct error in Matlab
古いコメントを表示
I receice this error
Attempt to reference field of non-structure array
Error in perturb_method (line 136)
[j,k]=find(pop(i).mat.p==x)
3 件のコメント
Rik
2021 年 3 月 10 日
Clearly you read Jan's answer below (as you edited the question). Did his suggestion solve the issue?
dalel amami
2021 年 3 月 11 日
Jan
2021 年 3 月 11 日
I've explained already how to use the debugger to find out, what the cause of the error message is. If pop(i).mat is not a truct, you cannot access a not existing field p . Without seeing your code and the data, it is impossible to guess, what you want to do instead.
What does Matlab show you, when it stops at the error message in debug mode, for:
class(pop)
class(pop(i).mat)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Debugging and Improving Code についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!