Change file matlab workspace name as the folder name
4 views (last 30 days)
I would like to ask how to change the variable.mat name in my workspace adding the folder name.
For example: in my workspace I have 'POWER.mat' , and the folder name is 'Results2021'
I would like to rename 'POWER.mat' in 'POWER_Results2021'
Thanks for the attention, I am a beginner with Matlab.
dpb on 27 Feb 2021
" 'POWER.mat' , and the folder name is 'Results2021'"
Well, it depends on whether you have already created the .mat file by having used SAVE or whether you're just referring to the variable POWER shown in the workspace above. For the latter
folder='POWER_Results2021'; % in variable to change or use cd to retrieve current