save a m*n cell file as n text files
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Bhaskar panchireddi
am 2 Jun. 2016
Kommentiert: Bhaskar panchireddi
am 2 Jun. 2016
My matlab code is generating a cell of order 10000*100. I have to save all the columns of this cell in text format separately. I mean i should get 100 text files. what should i do? please help
Akzeptierte Antwort
Ahmed Rashid
am 2 Jun. 2016
a = rand(1000, 100);
for k = 1:100
fileID = fopen(['data', num2str(k), '.txt'],'w');
fprintf(fileID,'%f\n',a(:, k));
fclose(fileID);
end
5 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!