write into file .txt ?

1 Ansicht (letzte 30 Tage)
amira hl
amira hl am 9 Jun. 2015
Beantwortet: Walter Roberson am 9 Jun. 2015
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Jun. 2015
fprintf( fid, '%s\n', G);

Weitere Antworten (0)

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by