Filter löschen
Filter löschen

Saving work space with a name from a variable

1 Ansicht (letzte 30 Tage)
RANJITH REDDY KALLURI
RANJITH REDDY KALLURI am 18 Okt. 2016
Beantwortet: Image Analyst am 18 Okt. 2016
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)

Akzeptierte Antwort

Image Analyst
Image Analyst am 18 Okt. 2016
Try this:
filename = sprintf('%s.mat', test.value); % where test.value is a string variable.
save(filename);

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 18 Okt. 2016
save(filename)
  1 Kommentar
RANJITH REDDY KALLURI
RANJITH REDDY KALLURI am 18 Okt. 2016
Bearbeitet: RANJITH REDDY KALLURI am 18 Okt. 2016
@Walter Roberson tried that, command works with no error. But .mat file is not created

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by