quick question about string read

1 回表示 (過去 30 日間)
UTA
UTA 2013 年 2 月 13 日
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!

採用された回答

José-Luis
José-Luis 2013 年 2 月 13 日
load(a1);

その他の回答 (1 件)

Matt Kindig
Matt Kindig 2013 年 2 月 13 日
Use the functional form of load, i.e.
load(a1);

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by