Assign a 'double' variable to struct
古いコメントを表示
I have a variable as such:
A.b = 'example';
And I want to change it to:
A.b.c = 2;
How can I do it without it prompting:
'Field assignment to a non-structure array object'
It worked on matlab's version before 2014.
Thank you,
Ziv
2 件のコメント
Stephen23
2018 年 1 月 10 日
You can't.
You first define the field b as a double. You cannot then try to access field b as a structure.
Steven Lord
2018 年 1 月 10 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!