Write in the different csv cells in matlab

6 visualizaciones (últimos 30 días)
Kris zenitis
Kris zenitis el 21 de Jul. de 2014
Respondida: Shashank Prasanna el 21 de Jul. de 2014
I am trying to write a cell array into a csv file. Array is of size Nx5. I am using the following code:
fid = fopen('file.csv','w');
for i=1:size(data_names,1)
fprintf(fid, '%s %s %s %s %s', data_names{i,1:5});
fprintf(fid,'\n');
end
fclose(fid);
The problem is the it does write only in the first column of csv so I ve got the first 5 elements of the first row in an one column vector of size 5. How is it possible to write in the different column cell in csv???

Respuestas (1)

Shashank Prasanna
Shashank Prasanna el 21 de Jul. de 2014

Categorías

Más información sobre Large Files and Big Data en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by