I want to save all the variables of the work space, with the name from variable.
I've tried using
filename = test.value;
save (filename)

 채택된 답변

Image Analyst
Image Analyst 2016년 10월 18일

0 개 추천

Try this:
filename = sprintf('%s.mat', test.value); % where test.value is a string variable.
save(filename);

추가 답변 (1개)

Walter Roberson
Walter Roberson 2016년 10월 18일

0 개 추천

save(filename)

댓글 수: 1

RANJITH REDDY KALLURI
RANJITH REDDY KALLURI 2016년 10월 18일
편집: RANJITH REDDY KALLURI 2016년 10월 18일
@Walter Roberson tried that, command works with no error. But .mat file is not created

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

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by