필터 지우기
필터 지우기

how to i save double in textfile ?

조회 수: 2 (최근 30일)
Kelly Howard
Kelly Howard 2016년 1월 13일
답변: Walter Roberson 2016년 1월 13일
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)

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 13일
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.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by