Borrar filtros
Borrar filtros

how to i save double in textfile ?

2 visualizaciones (últimos 30 días)
Kelly Howard
Kelly Howard el 13 de En. de 2016
Respondida: Walter Roberson el 13 de En. de 2016
i would like to save the following data into .txt format. i tried to save it using string but the code is messed up.
load testelm.mat
fidtrg = fopen('C:\Users\wert\Desktop\action recognition latest\trainelm11.txt' ,'wt')
a = num2str(c);
fprintf(fidtrg, '%s',a);
fclose(fidtrg)

Respuestas (1)

Walter Roberson
Walter Roberson el 13 de En. de 2016
save('C:\Users\wert\Desktop\action recognition latest\trainelm11.txt', 'fidtrg', '-ASCII');
You might also want to add '-DOUBLE' to the end of the options.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by