Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: : [ ] function?
Date: Sat, 19 Jul 2008 12:20:03 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 70
Message-ID: <g5sm5j$ou9$1@fred.mathworks.com>
References: <g5sevj$ra1$1@fred.mathworks.com> <g5sgum$epd$1@fred.mathworks.com> <g5sjom$jhc$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216470003 25545 172.30.248.38 (19 Jul 2008 12:20:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 19 Jul 2008 12:20:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:480438



"ching l" <chinglnc@hotmail.com> wrote in message 
<g5sjom$jhc$1@fred.mathworks.com>...
> "John D'Errico" <woodchips@rochester.rr.com> wrote in
> message <g5sgum$epd$1@fred.mathworks.com>...
> > "ching l" <chinglnc@hotmail.com> wrote in message 
> > <g5sevj$ra1$1@fred.mathworks.com>...
> > > this might sound stupid or simple....can I do something like
> > > this in matlab?
> > > 
> > > a= 1, 2, 3 ;
> > > 
> > > function(a)= [1, 2, 3] Re
> > > 
> > > 
> > > is there such function?
> > 
> > What are you asking for? Are you asking
> > for a function that acts like the [] operator?
> > Horzcat is that function, or vertcat, or cat.
> > 
> > Are you asking for a function that returns
> > a constant vector, or something like that? 
> > I'm quite confused by your question.
> > 
> > John
> 
> I want to have this in a gui,whenever the call back function
> is called, it will create something like this....
> 
> function pushbutton7_Callback(hObject, eventdata, handles)
> 
> 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])
> 
> does it make sense?
> 

Sorry, but no sense at all.

> Callback 1= [1, 2, 3])

Are you asking how to create a syntax error? ;-)

"Callback 1"

Is not the name of a valid variable in MATLAB.

Ending the line with a spare ) is also a
good way to create a syntax error.

Likewise, I have no idea what you intend
by the following:

> Callback 2= [Callback 1: 4, 5, 6])

Disregarding the other syntax errors I
already mentioned, what do you want the
colon operator to do in the middle of that
expression?

Finally, I have no idea how this question
bears on the subject title, which indicated
a question about [] as a function.

Sorry, but I'm way more confused than I
was before.

John