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.

 Akzeptierte Antwort

madhan ravi
madhan ravi am 5 Feb. 2019
Bearbeitet: madhan ravi am 5 Feb. 2019

0 Stimmen

EDITED:
M=10;
N=15;
solutions=zeros(M,N);
for k=1:M
solutions(k,:)=randperm(N);
end
dlmwrite('file1.csv',solutions)

3 Kommentare

msr16
msr16 am 5 Feb. 2019
i need all solutions in one csv file but this create 10 file.
madhan ravi
madhan ravi am 5 Feb. 2019
See the edited answer.
msr16
msr16 am 5 Feb. 2019
thanks madhan ravi it works

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Gefragt:

am 5 Feb. 2019

Kommentiert:

am 5 Feb. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by