필터 지우기
필터 지우기

Saving work space with a name from a variable

조회 수: 1 (최근 30일)
RANJITH REDDY KALLURI
RANJITH REDDY KALLURI 2016년 10월 18일
답변: Image Analyst 2016년 10월 18일
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일
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일
  댓글 수: 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

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

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by