save each loop data in one csv file
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
msr16
el 5 de Feb. de 2019
Comentada: msr16
el 5 de Feb. de 2019
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 comentarios
Respuesta aceptada
madhan ravi
el 5 de Feb. de 2019
Editada: madhan ravi
el 5 de Feb. de 2019
EDITED:
M=10;
N=15;
solutions=zeros(M,N);
for k=1:M
solutions(k,:)=randperm(N);
end
dlmwrite('file1.csv',solutions)
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Standard File Formats en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!