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(fid1, '%3.0f', temp );fprintf(fid1, '\n');fclose(fid1);end end end
Output on the command line.
Temperature = -40Temperature = 0Temperature = 25Temperature = 60Temperature = -40Temperature = 0Temperature = 25Temperature = 60Temperature = -40Temperature = 0Temperature = 25Temperature = 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 ?
Best Answer