dlmwrite with text and numbers

8 visualizaciones (últimos 30 días)
Daelyn Greene
Daelyn Greene el 19 de Feb. de 2019
Comentada: Daelyn Greene el 19 de Feb. de 2019
I am wanting to transfer data that is input into a UI to a csv file. I am using dlmwrite currently but keep running into the issue of the csv not functioning properly. Dlmwrite is outputting nonsense text, and I frankly am lost on what to try. I've done all I know how to do.
  4 comentarios
per isakson
per isakson el 19 de Feb. de 2019
Editada: per isakson el 19 de Feb. de 2019
dlmwrite, Write matrix to ASCII-delimited file says dlmwrite(filename,M) writes numeric data in array M to an ASCII format file, i.e not text
Daelyn Greene
Daelyn Greene el 19 de Feb. de 2019
Do you know of a workaround for that then? Like how to transfer the text to a number array or something like that.

Iniciar sesión para comentar.

Respuesta aceptada

per isakson
per isakson el 19 de Feb. de 2019
Something like
for jj = 1: len
fprintf( fid, '___\n', num(jj), txt{jj} )
end
is a standard approach
Another answer is under the tab, Examples, of tprintf, tprintf writes tabular data to a text file.
  1 comentario
Daelyn Greene
Daelyn Greene el 19 de Feb. de 2019
I will try that. Thanks for the help!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by