write into file .txt ?

조회 수: 1 (최근 30일)
amira hl
amira hl 2015년 6월 9일
답변: Walter Roberson 2015년 6월 9일
hi this is part of the code
G=char(bin2dec(char(bin+'0')))'
fid = fopen( 'results.txt', 'wt' );
fprintf( fid, '%f\n', G);
this is what G is
G =
the pa
the text file results
116.000000
104.000000
101.000000
32.000000
112.000000
97.000000
i want to write G letters into results.txt, how is that done?

채택된 답변

Walter Roberson
Walter Roberson 2015년 6월 9일
fprintf( fid, '%s\n', G);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by