Save variable to .mat file
1 次查看(过去 30 天)
显示 更早的评论
I would like to kindly ask you for the help with dynamical naming of saved variables in MATLAB.
I have the variable:
Name=’image_xx’
My script generates a variable: waviness
My problem is that I need to save the variable waviness to the .mat file with the name:
image_xx_waviness via the command save(). Please, can you help me how to do that.
Many thanks for any help.
0 个评论
回答(1 个)
David Fletcher
2021-4-6
编辑:David Fletcher
2021-4-6
try this:
save(strcat(Name,'_waviness'),'waviness')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!