Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: string extra character?
Date: Sat, 19 Jul 2008 00:06:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 68
Message-ID: <g5rb5a$9qk$1@fred.mathworks.com>
References: <g5r3jd$s4u$1@fred.mathworks.com> <g5r50a$7ro$1@canopus.cc.umanitoba.ca> <g5r7iv$aus$1@fred.mathworks.com> <g5r8iq$im9$1@fred.mathworks.com>
Reply-To: "ching l" <chinglnc@hotmail.com>
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 1216425962 10068 172.30.248.37 (19 Jul 2008 00:06:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 19 Jul 2008 00:06:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:480403



"matt dash" <n.a@mail.com> wrote in message
<g5r8iq$im9$1@fred.mathworks.com>...
> "ching l" <chinglnc@hotmail.com> wrote in message
> <g5r7iv$aus$1@fred.mathworks.com>...
> > 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]);
> > 
> > 
> > 
> 
> 
> 
> Just because you have 4 of each doesn't mean it makes
> sense... you have the wrong number of arguments for your
> functions. You need this:
> 
> csvwrite(num2str(ceil(handles.randValue),'%d_1.dat'), [1]);
> 
> Also the square brackets arent doing anything. Though it
> seems like you want something other than "1" for your last
> argument anyway... you realize this will just output a text
> file with the number 1 in it, right?

thanks for that. Yea, I know it will just output a text file
with the number 1.

Ideally, I want to have different arrays when the function
is called everytime,  something like this...

Callback 1= [1, 2, 3])
Callback 2= [Callback 1: 4, 5, 6])
Callback 3= [Callback 2: 7, 8, 9])
Callback 4 = csvwrite ('string', [callback 3+ callback 4])

that means, the last callback is collecting all the data and
output it as a text file.

not sure how to do it though......