save each loop data in one csv file

9 ビュー (過去 30 日間)
msr16
msr16 2019 年 2 月 5 日
コメント済み: msr16 2019 年 2 月 5 日
hi i need to save each iteration result in one csv file or matrix format.
for i=1:10
solutions=randperm(15)
end
thanks in advance.

採用された回答

madhan ravi
madhan ravi 2019 年 2 月 5 日
編集済み: madhan ravi 2019 年 2 月 5 日
EDITED:
M=10;
N=15;
solutions=zeros(M,N);
for k=1:M
solutions(k,:)=randperm(N);
end
dlmwrite('file1.csv',solutions)
  3 件のコメント
madhan ravi
madhan ravi 2019 年 2 月 5 日
See the edited answer.
msr16
msr16 2019 年 2 月 5 日
thanks madhan ravi it works

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by