Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
From: Peter Boettcher <boettcher@ll.mit.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: : [ ] function?
References: <g5sevj$ra1$1@fred.mathworks.com>
Message-ID: <muyzlob6td6.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:TL4BLI6ALdU++Ai2kz2jpKkOAZQ=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 25
Date: Mon, 21 Jul 2008 13:26:45 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1216660463 155.34.163.114 (Mon, 21 Jul 2008 13:14:23 EDT)
NNTP-Posting-Date: Mon, 21 Jul 2008 13:14:23 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:480721



"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