Hello, I have a script that loads a MAT file into the workspace and changes some fields of a struct in the MAT file. After that, I want the script to save the MAT file with the edited struct in it(not create a new file). How do I do this?

 採用された回答

Walter Roberson
Walter Roberson 2011 年 7 月 30 日

0 投票

save('YouOldFileName.mat', 'YourStructureVariableName','-append')

1 件のコメント

JM
JM 2011 年 8 月 1 日
Yep that works, thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Workspace Variables and MAT Files についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by