Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: catching \n (newline)
Date: Tue, 21 Aug 2007 00:08:47 +0000 (UTC)
Organization: Tel-Aviv University
Lines: 41
Message-ID: <fadaef$f1l$1@fred.mathworks.com>
References: <fad4r2$m0a$1@fred.mathworks.com> <fad87q$leu$1@canopus.cc.umanitoba.ca>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1187654927 15413 172.30.248.37 (21 Aug 2007 00:08:47 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Aug 2007 00:08:47 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 482202
Xref: news.mathworks.com comp.soft-sys.matlab:424713



Thanks.

-naor
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in 
message <fad87q$leu$1@canopus.cc.umanitoba.ca>...
> In article <fad4r2$m0a$1@fred.mathworks.com>,
> Naor Movshovitz <lazy_n@yahoo.com> wrote:
> >sorry about the stupid question but,
> 
> >>> a=sprintf('\n');
> >>> strcmp(a,'\n')
> 
> >ans =
> >
> >     0
> 
> >and i don't see anything in the help for strcmp.
> 
> In the *printf() I/O functions, \n is a special token 
sequence
> representing newline. In most other places in matlab, \n 
is
> a two character sequence, \ and n.
> 
> >> a=sprintf('\n');
> >> strcmp(a,char(10))
> 
> ans =
> 
>      1
> >> length('\n')
> 
> ans =
> 
>      2
> 
> 
> -- 
>   All is vanity.                                       -- 
Ecclesiastes