[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing a commented output to file
From: |
AlexG1 |
Subject: |
Re: Writing a commented output to file |
Date: |
Wed, 6 May 2009 03:38:04 -0700 (PDT) |
John W. Eaton-3 wrote:
>
>
> Here's one more way:
>
> fid = fopen ('foo.dat', 'w');
> fprintf (fid, '%% Some comment 1\n%% Some comment 2\n');
> nc = size (x, 2);
> fmt = sprintf ('%s\n', repmat ('%f ', [1, nc]));
> fprintf (fid, fmt, x');
>
>
>
Thanks, works great.
There's something I didn't understand though - can you please explain why
the transpose on the fprintf() call is needed?
--
View this message in context:
http://www.nabble.com/Writing-a-commented-output-to-file-tp23385991p23404086.html
Sent from the Octave - General mailing list archive at Nabble.com.