Borrar filtros
Borrar filtros

how to write text or character

6 visualizaciones (últimos 30 días)
nkumar
nkumar el 14 de Oct. de 2014
Editada: Orion el 14 de Oct. de 2014
I have a array
stop={'a', 'about', 'above', 'the'};
I want to write this to a text file like
a about above the
or
a about above the
i tried many commands like fwrite,fprintf,dlmwrite,but could not get like this
kindly assist

Respuesta aceptada

Orion
Orion el 14 de Oct. de 2014
Editada: Orion el 14 de Oct. de 2014
Hi,
you want something like :
stop={'a', 'about', 'above', 'the'};
fid = fopen('MyFile.txt','wt');
for i = 1:length(stop)
fprintf(fid,'%s ',stop{i});
end
fclose(fid);

Más respuestas (0)

Categorías

Más información sobre Data Import and Export en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by