You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Unlike MATLAB's solution, the variables are saved with their variable names'. You must call this function for each variable you want to save, but the function will not overwrite previous mat files.
function parsave(fname,data)
var_name=genvarname(inputname(2));
eval([var_name '=data'])
try
save(fname,var_name,'-append')
catch
save(fname,var_name)
end
Cite As
Philip (2026). parsave (https://au.mathworks.com/matlabcentral/fileexchange/30778-parsave), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.2.0.0 (1.06 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
