quick question about string read

1 Ansicht (letzte 30 Tage)
UTA
UTA am 13 Feb. 2013
I use 'sprintf' function get a string and store in a1 as follow: % a1 = sprintf('%s_%s', 'modelsq', '1');
I just want to load the mat file which name is modelsq_1, however, it is fail to do like this: % load a1; how should I do? thank you very much!

Akzeptierte Antwort

José-Luis
José-Luis am 13 Feb. 2013

Weitere Antworten (1)

Matt Kindig
Matt Kindig am 13 Feb. 2013
Use the functional form of load, i.e.
load(a1);

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by