フィルターのクリア

sprintf changes in each iteration

1 回表示 (過去 30 日間)
Md
Md 2014 年 3 月 27 日
編集済み: Walter Roberson 2022 年 4 月 29 日
Hey guys, I want to change the sprintf in each iteration using a for loop. I want to read 1403 for a mat file and also I want to change the value 1 in each iteration. So, the value of 1 will increase in each iteration. And also in each iteration 1403 value will change and it will come from a mat file.
for iFile=1:10
sprintf( 'A_1_20%4d',(1403-iFile) ) );
end
Thanks in advance.
  1 件のコメント
ANDREA FORCELLA
ANDREA FORCELLA 2022 年 4 月 29 日
@Md i don't understand your question, it's indecipherable!!!

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

採用された回答

Mischa Kim
Mischa Kim 2014 年 3 月 27 日
編集済み: Mischa Kim 2014 年 3 月 27 日
Md, do you mean something like
for iFile=1:10
sprintf('A_%d_20%4d',iFile,1403-iFile+1)
end
To load a .mat file into the workspace simply use the load command, e.g.
load mymat.mat

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by