how can i save the output of the loop

1 回表示 (過去 30 日間)
Ali
Ali 2014 年 12 月 2 日
コメント済み: Ali 2014 年 12 月 2 日
I want to make this loop:
for i=46100:1:46200
shotnumber=i;
function
save ifile
clear
end
each number of 'i' represents a data file and i need to apply a 'function' to these files from 46100 to 46200. I need to save all files under the name "number" which is 'i' attached to the word "file", so that each time the name differs by the increment of i. Is that possible?

採用された回答

Thorsten
Thorsten 2014 年 12 月 2 日
filename = sprintf('file%d', i);
save(filename)
  1 件のコメント
Ali
Ali 2014 年 12 月 2 日
Thanks for your helpful answer

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by