help-octave
[Top][All Lists]
Advanced

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

fprintf bug?


From: frank wang
Subject: fprintf bug?
Date: Wed, 9 Aug 2006 11:26:54 -0700

Hi,
While using Octave, I noticed a problem with fprintf. It maybe a bug and I need expert's opinion.
 
Here is the code it does not work. It will print the output to a file named e(fid); u is a complex number. In this example, it is u =  0.0044312 +  0.0044312i
 
fid = fopen('test_report.txt','w');
for (ii = 0:15)
ii

   fprintf(fid,'%d     %f\n', ii, u);
end
fclose(fid)
 
If we add ; after u, then it will print the data to test_report.txt. Here is the code:
 
fid = fopen('test_report.txt','w');
for (ii = 0:15)
ii
u;
   fprintf(fid,'%d     %f\n', ii, u);
end
fclose(fid)
 
Thanks
 
frank

reply via email to

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