Edit and save MAT file

3 Ansichten (letzte 30 Tage)
JM
JM am 29 Jul. 2011
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 30 Jul. 2011
save('YouOldFileName.mat', 'YourStructureVariableName','-append')
  1 Kommentar
JM
JM am 1 Aug. 2011
Yep that works, thanks!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Workspace Variables and MAT Files finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by