フィルターのクリア

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 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by