Edit and save MAT file

3 vues (au cours des 30 derniers jours)
JM
JM le 29 Juil 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?

Réponse acceptée

Walter Roberson
Walter Roberson le 30 Juil 2011
save('YouOldFileName.mat', 'YourStructureVariableName','-append')
  1 commentaire
JM
JM le 1 Août 2011
Yep that works, thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by