|From:||Dmitri A. Sergatskov|
|Subject:||Re: Problem with Matlab script|
|Date:||Thu, 24 Mar 2016 10:26:44 -0500|
On Tue, Mar 22, 2016 at 3:19 PM, Riedel Thomas <address@hidden> wrote:Hi guys,
i have a problem with a matlab script i like to run in Octave.
The commands below do not result in an output of a text file (Results_formulas.txt).
I suspect that the matlab syntax for "fprintf" does not work here, but i cannot figure out the error.
Many thanks for your help,
output_file = ['Results_formulas.txt'];
data = ""> fid = fopen(output_file,'wt');
fprintf(fid,'%4.5f %4.6f %2.0f %2.0f %2.0f %2.0f %2.0f %1.0f %8.0f %5.0f %3.0f %4.2f %1.5f %2.0f %2.0f %7.0f %1.0f %1.0f %1.0f %1.0f\n', data);after I substituted actual values for data (I just did data = "" ) I have no problem running the script you provided. I get a text file named Results_formulas.txt, and it has a row of data formatted as you specified. I verified that the results are the same in Matlab. (I'm running Octave 4.0.0 on windows)maybe you can provide a sample of the actual data giving you problems? and copy paste any error messages exactly as they appear?Nick J
|[Prev in Thread]||Current Thread||[Next in Thread]|