MATLAB: Saving all Mat file as default with -v7.3

-v7.3matfileMATLABsave

Hi,
I was wondering if we can change setting to save MAT file from File > Preferences > General > MAT-Files to -V7.3 using command line and force all save command to save matfile in -V7.3 without adding argument in save function?
Best Regards, Mohammad

Best Answer

rootgroup = settings();
rootgroup.matlab.general.matfile.SaveFormat.PersonalValue = 'v7.3';
Note: this will change the matlab.settings file in prefdir(), provided that there is permission to change it. So this is the same as if you had used the menu to change the preference.