MATLAB: Edit and save MAT file

save

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?

Best Answer

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