フィルターのクリア

writematrix for multiple csv files

6 ビュー (過去 30 日間)
Brie E.
Brie E. 2020 年 6 月 15 日
コメント済み: Brie E. 2020 年 6 月 16 日
Hello,
Essnetially I am attempting to achieve the following:
writematrix (PhaseAve{i, 1}, 'INTL_i.csv')
but I am unsure what the proper formatting is such that the file renames each i-th iteration.
I have utilized the following code to break out unique file names for each iteration, but now I am not sure how to reference that file name that corresponds to the i-th iteration. The first section succeeds in naming the files however the code gets stuck on the second section so I think that is where my formatting errors lie.
%%%% naming each file
i = 1: length(a);
BaseName='INTL_';
for k=1:875
FileName=[BaseName,num2str(k), '.csv'];
end
%%%% writing to each file
while i <= a
writematrix(PhaseAve{iii,1},FileName)
end
I know this is probably super basic...and I may not be explaining it well. Thanks for any advice in advance.
This is a long-form illustration of the result I am trying to achieve:
writematrix (PhaseAve{1,1},'INTL_1.csv')
writematrix (PhaseAve{2,1},'INTL_2.csv')
writematrix (PhaseAve{3,1},'INTL_3.csv')
writematrix (PhaseAve{4,1},'INTL_4.csv')
writematrix (PhaseAve{5,1},'INTL_5.csv')
writematrix (PhaseAve{6,1},'INTL_6.csv')
writematrix (PhaseAve{7,1},'INTL_7.csv')
writematrix (PhaseAve{8,1},'INTL_8.csv')
writematrix (PhaseAve{9,1},'INTL_9.csv')
writematrix (PhaseAve{10,1},'INTL_10.csv')
%through
writematrix (PhaseAve{875, 1}, 'INTL_875.csv')

採用された回答

madhan ravi
madhan ravi 2020 年 6 月 15 日
  1 件のコメント
Brie E.
Brie E. 2020 年 6 月 16 日
Thank you thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCode Generation, GPU, and Third-Party Support についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by