[Scilab-users] Formatting
James Holland
j_holland at msn.com
Sun Jan 7 20:49:28 CET 2018
I'm trying to generate a file for an arbitrary waveform generator, the format
is csv but I am having problems formatting the output, this is my current
attempt.
<code>
for i = 1:nr
mfprintf(fd,'%i', points(i,1));
mfprintf(fd, ',');
mfprintf(fd,'%.2E\n\r', points(i,2));
end
</code>
Its close it puts a '+' in the output for positive E numbers and the AWG
software rejects this. For example I have:
<code>
97,-2.50E+00
98,-2.50E+00
99,-2.50E+00
100,-2.50E+00
101,6.00E+00
102,6.00E+00
103,6.00E+00
104,6.00E+00
</code>
but I need:
<code>
97,6.00E00
98,6.00E00
99,6.00E00
100,6.00E00
101,-2.50E00
102,-2.50E00
103,-2.50E00
</code>
is it possible to achieve this just using formatting tags?
TIA James
--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
More information about the users
mailing list