help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Values ​​not getting printed in csv file


From: Ganesh Kini
Subject: Values ​​not getting printed in csv file
Date: Sun, 7 Jun 2020 19:34:34 +0200

Hi
I have a small issue in printing the values in .csv file
Code.
for
for
for
- some lines of code
fprintf ( "Temperature =% 3.0f \ n" , temp);
[fid1, msg1] = fopen ( 'file1.csv' , 'w' );
fprintf (fid1, 'temperature' );
fprintf (fid, '% 3.0f' , temp);
fprintf (fid, '\ n' );
fclose (fid);
end
end
end
Output on the command line.
Temperature = -40
Temperature = 0
Temperature = 25
Temperature = 60
Temperature = -40
Temperature = 0
Temperature = 25
Temperature = 60
Temperature = -40
Temperature = 0
Temperature = 25
Temperature = 60
But in the CSV file i have only the last line of the output is printed.
Temperature = 60
I need to print all the values, what can be done?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]