Path: news.mathworks.com!not-for-mail
From: "Huy " <phananhhuy@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to return a value after a pushbutton is pressed to main function
Date: Thu, 3 Jan 2008 12:37:15 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 46
Message-ID: <fliktr$4db$1@fred.mathworks.com>
References: <flig8i$nlq$1@fred.mathworks.com>
Reply-To: "Huy " <phananhhuy@mathworks.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1199363835 4523 172.30.248.35 (3 Jan 2008 12:37:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Jan 2008 12:37:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 113206
Xref: news.mathworks.com comp.soft-sys.matlab:444173


"Vihang Patil" <vihang_patil@yahoo.com> wrote in message 
<flig8i$nlq$1@fred.mathworks.com>...
> Hello 
> I am trying to send a value to the main function after I 
> press a pushbutton, but I am unable to do so
> for example;
> 
> Create a small gui with 2 radiobuttons having tag viz, 
> radiobutton1 and radiobutton2 and a pushbutton with tag 
> pushbutton1
> 
> Now, after I press pushbutton1 I should be able to pass 
> some values corresponding to the radiobbutton which  
> is "On" to the main function. How do I do that. I am 
using 
> GUIDE for doing this and I am not able to understand, 
> whether I should use varargout for this purpose and how 
> can I use it?
> 
> ex:
> varargout = selection(varargin)
> 
> If I select radiobutton1 and press pushbutton1 then 
> varargout should have string value "Radiobutton1 
selected" 
> and if radiobutton2 is selected then varargout should 
have 
> string value "Radiobutton2 is selected".
> 
> Please guide
> Thanks
> Vihang
> 
> 
> 
> 


Have you tried uiwait function?

http://www.mathworks.com/matlabcentral/newsreader/
view_thread/161436


Anh Huy Phan
RIKEN - BSI