help-octave
[Top][All Lists]
Advanced

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

Required format for simulation


From: Ganesh Kini
Subject: Required format for simulation
Date: Tue, 9 Jun 2020 12:40:34 +0200

Hi, I was running this code ( don't get into the details of the code)

[fid, msg] = fopen ( 'file1.csv' , 'wt' );
assert (fid> = 3, msg)
fprintf (fid, '% s \ t% s \ t% s \ n' , 'Temperature' , 'Value_n' , 'Value_p' );
for
    for
        for
            ...
            fprintf (fid, '% 3.0f \ t% 1.1f \ t% 1.1f \ n' , temp, vnw, vpw);
        end
    end
end
fclose (fid);

The output of the code
Temperature  Value_n Value_p ,-40 0.2 0.1 20 0.1 0.4 120 0.5 4.5

where as i should get
Temperature, -40 20 120
Value_n, 0.2 0.1 0.5
Value_p, 0.1 0.4 4.5

How can i change to get the above output

reply via email to

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