フィルターのクリア

Put a variable in a file title name

4 ビュー (過去 30 日間)
yusra Ch
yusra Ch 2020 年 10 月 18 日
コメント済み: yusra Ch 2020 年 10 月 18 日
Hello,
I want to run a for loop that has an id=1:100 and at the end of each iteration I want matlab to save the results under a file name "Trace_id". So at the end of the programe I will have files called Trace_1 , Trace_2 ,etc...
Thank you

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 10 月 18 日
編集済み: Ameer Hamza 2020 年 10 月 18 日
Something liks this
for id=1:100
% do your processing
M; % matrix to write to file
filename = sprintf('Trace_%d', id);
writematrix(M, filename)
end
  3 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 10 月 18 日
@Vladimir, thanks for pointing out.
yusra Ch
yusra Ch 2020 年 10 月 18 日
Thank you guys for your help, I really appreciate it

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by