Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: : [ ] function?
Date: Mon, 21 Jul 2008 18:16:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 41
Message-ID: <g62jp2$f6p$1@fred.mathworks.com>
References: <g5sevj$ra1$1@fred.mathworks.com> <muyzlob6td6.fsf@G99-Boettcher.llan.ll.mit.edu>
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 1216664162 15577 172.30.248.37 (21 Jul 2008 18:16:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 21 Jul 2008 18:16:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:480728



Peter Boettcher <boettcher@ll.mit.edu> wrote in message
<muyzlob6td6.fsf@G99-Boettcher.llan.ll.mit.edu>...
> "ching l" <chinglnc@hotmail.com> writes:
> 
> > Thanks Peter. That's really helpful. I sort of get the idea
> > of doing this in Matlab command, but not in Gui. As I'm not
> > so sure how to create a Matrix function. That's what I
> > thought which I did it in Matlab. 
> >
> > a= [1, 2, 3];
> > b= [a;1, 2, 3];
> > c= [b; 1, 2, 3];
> >
> > then finally write the matrix into text file.
> >
> > But Gui doesn't understand what is 
> > a= [1, 2, 3]; because that's not a function. 
> >
> > What I want is, when the callback function is called, it can
> > create a= [1, 2, 3]. As simple as that.
> 
> Don't change how you create or call the callback function.
 Just put
> that code in the body of the callback function.  The
header of the
> function, and the 'Callback' property of the GUI, will
look exactly the
> same as it did before.
> 
> -Peter

Did I miss something? That's what I did but nothing
happened....did you mean this?

function  answer_nochange_Callback(hObject, eventdata, handles)

a= [1, 2, 3];