Save variable to .mat file
조회 수: 2 (최근 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!