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.

답변 (1개)

David Fletcher
David Fletcher 2021년 4월 6일
편집: David Fletcher 2021년 4월 6일

0 개 추천

try this:
save(strcat(Name,'_waviness'),'waviness')

댓글 수: 1

Jan Kubicek
Jan Kubicek 2021년 4월 13일
It works well, thank you very much for your help :-)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

태그

질문:

2021년 4월 6일

댓글:

2021년 4월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by