Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: string extra character?
Date: Fri, 18 Jul 2008 23:05:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <g5r7iv$aus$1@fred.mathworks.com>
References: <g5r3jd$s4u$1@fred.mathworks.com> <g5r50a$7ro$1@canopus.cc.umanitoba.ca>
Reply-To: "ching l" <chinglnc@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216422303 11228 172.30.248.35 (18 Jul 2008 23:05:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 18 Jul 2008 23:05:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:480398



roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g5r50a$7ro$1@canopus.cc.umanitoba.ca>...
> In article <g5r3jd$s4u$1@fred.mathworks.com>,
> ching l <chinglnc@hotmail.com> wrote:
> >a= 80;
> >csvwrite(num2str(a), [2]);
> 
> >the result = 80.dat
> 
> >what can I do so that the file name can be 80_1?
> 
> csvwrite(num2str(a,'%d_1.dat'),[2]);
> -- 
>   "If there were no falsehood in the world, there would be no
>   doubt; if there were no doubt, there would be no
inquiry; if no
>   inquiry, no wisdom, no knowledge, no genius."
>                                               -- Walter
Savage Landor


i really can't see anything wrong with the codes below, 
it has the bracket unbalanced error, but it has 4 pairs
brackets which is right....

csvwrite ((num2str(ceil(handles.randValue)),'%d_1.dat'), [1]);