help-octave
[Top][All Lists]
Advanced

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

Re: Values ​​not getting printed in csv file


From: Andrew Janke
Subject: Re: Values ​​not getting printed in csv file
Date: Mon, 8 Jun 2020 13:38:21 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.9.0


On 6/8/20 12:13 PM, N wrote:
>> Thank so much, I got the results

>> [fid1, msg1]   = fopen('file1.csv', 'wt' );
[...snip...]


> You have to add \n to insert a new line, windows also need an additional \r 
> but do not remember order. \t I think is a tab, I have concluded ; is rather 
> good choice separator as at least in Sweden , is used as decimal but I have 
> also seen it used as thousand separator.

It's \r\n (also know as "CRLF" for "carriage return, line feed") on
Windows. It's not necessary to add it in Octave code, though: because
the file was opened in "t" mode, Octave will do the conversion of "\n"
to your system's native (Unix or DOS) line ending format automatically.
(Which may or may not be what you want, depending on where you're going
to distribute the resulting file.)

Yes, \t is tab.

Cheers,
Andrew



reply via email to

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