save each loop data in one csv file
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 5 Feb. 2019
Bearbeitet: madhan ravi
am 5 Feb. 2019
EDITED:
M=10;
N=15;
solutions=zeros(M,N);
for k=1:M
solutions(k,:)=randperm(N);
end
dlmwrite('file1.csv',solutions)
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Standard File Formats finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!