Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Callbaks, Passing by reference, setting output
Date: Fri, 14 Sep 2007 10:01:49 +0000 (UTC)
Organization: KTH
Lines: 17
Message-ID: <fcdm6c$vk$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1189764109 1012 172.30.248.36 (14 Sep 2007 10:01:49 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 14 Sep 2007 10:01:49 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1062272
Xref: news.mathworks.com comp.soft-sys.matlab:428519



Hi,

I have an textcontrol defining a callback {@function, var1, 
var2}

I want to assign var1 the value of the textbox + the value 
of var2. This is no problem, but since matlab passes by 
value (?) the values does not change var1. How can I either 
pass by reference or define an output with my callback?

a callback like this:
var1 = function(var1, var2) 

/Karl
Developer @ Lundin Mining AB 
http://www.lundinmining.com/index.php 
Developer @ Auktionshuset Kolonn AB http://www.kolonn.se