Deleting a field from a sturcture
6 ビュー (過去 30 日間)
古いコメントを表示
I have been trying to delete a field from a structure, but it keeps coming back!
I do rmfield(myStruct,myField) and it shows all the fields that strucuture has and its not on that one, but then I go look at an individual item and its back, and then I go back and look at the structure and its back there too, I am so lost. It looks like its gone, and then poof, its back. Its like herpes.
Any suggestions?
0 件のコメント
採用された回答
Brian B
2012 年 12 月 29 日
Did you save the results of rmfield back to myStruct?
myStruct = rmfield(myStruct, myField)
Brian
3 件のコメント
Image Analyst
2012 年 12 月 29 日
Understandable. That would have worked in some languages, ones that have pass by reference, but MATLAB is pass by value.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!