<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161490</link>
    <title>MATLAB Central Newsreader - how to return a value after a pushbutton is pressed to main function</title>
    <description>Feed for thread: how to return a value after a pushbutton is pressed to main function</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 03 Jan 2008 11:17:38 -0500</pubDate>
      <title>how to return a value after a pushbutton is pressed to main function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161490#407837</link>
      <author>Vihang Patil</author>
      <description>Hello &lt;br&gt;
I am trying to send a value to the main function after I &lt;br&gt;
press a pushbutton, but I am unable to do so&lt;br&gt;
for example;&lt;br&gt;
&lt;br&gt;
Create a small gui with 2 radiobuttons having tag viz, &lt;br&gt;
radiobutton1 and radiobutton2 and a pushbutton with tag &lt;br&gt;
pushbutton1&lt;br&gt;
&lt;br&gt;
Now, after I press pushbutton1 I should be able to pass &lt;br&gt;
some values corresponding to the radiobbutton which  &lt;br&gt;
is "On" to the main function. How do I do that. I am using &lt;br&gt;
GUIDE for doing this and I am not able to understand, &lt;br&gt;
whether I should use varargout for this purpose and how &lt;br&gt;
can I use it?&lt;br&gt;
&lt;br&gt;
ex:&lt;br&gt;
varargout = selection(varargin)&lt;br&gt;
&lt;br&gt;
If I select radiobutton1 and press pushbutton1 then &lt;br&gt;
varargout should have string value "Radiobutton1 selected" &lt;br&gt;
and if radiobutton2 is selected then varargout should have &lt;br&gt;
string value "Radiobutton2 is selected".&lt;br&gt;
&lt;br&gt;
Please guide&lt;br&gt;
Thanks&lt;br&gt;
Vihang&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 03 Jan 2008 12:37:15 -0500</pubDate>
      <title>Re: how to return a value after a pushbutton is pressed to main function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161490#407847</link>
      <author>Huy </author>
      <description>"Vihang Patil" &amp;lt;vihang_patil@yahoo.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;flig8i$nlq$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello &lt;br&gt;
&amp;gt; I am trying to send a value to the main function after I &lt;br&gt;
&amp;gt; press a pushbutton, but I am unable to do so&lt;br&gt;
&amp;gt; for example;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Create a small gui with 2 radiobuttons having tag viz, &lt;br&gt;
&amp;gt; radiobutton1 and radiobutton2 and a pushbutton with tag &lt;br&gt;
&amp;gt; pushbutton1&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Now, after I press pushbutton1 I should be able to pass &lt;br&gt;
&amp;gt; some values corresponding to the radiobbutton which  &lt;br&gt;
&amp;gt; is "On" to the main function. How do I do that. I am &lt;br&gt;
using &lt;br&gt;
&amp;gt; GUIDE for doing this and I am not able to understand, &lt;br&gt;
&amp;gt; whether I should use varargout for this purpose and how &lt;br&gt;
&amp;gt; can I use it?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ex:&lt;br&gt;
&amp;gt; varargout = selection(varargin)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If I select radiobutton1 and press pushbutton1 then &lt;br&gt;
&amp;gt; varargout should have string value "Radiobutton1 &lt;br&gt;
selected" &lt;br&gt;
&amp;gt; and if radiobutton2 is selected then varargout should &lt;br&gt;
have &lt;br&gt;
&amp;gt; string value "Radiobutton2 is selected".&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Please guide&lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt; Vihang&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Have you tried uiwait function?&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/matlabcentral/newsreader/"&gt;http://www.mathworks.com/matlabcentral/newsreader/&lt;/a&gt;&lt;br&gt;
view_thread/161436&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Anh Huy Phan&lt;br&gt;
RIKEN - BSI&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 04 Jan 2008 07:03:15 -0500</pubDate>
      <title>Re: how to return a value after a pushbutton is pressed to main function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161490#407963</link>
      <author>Vihang Patil</author>
      <description>&lt;br&gt;
&amp;gt; Have you tried uiwait function?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/matlabcentral/newsreader/"&gt;http://www.mathworks.com/matlabcentral/newsreader/&lt;/a&gt;&lt;br&gt;
&amp;gt; view_thread/161436&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Anh Huy Phan&lt;br&gt;
&amp;gt; RIKEN - BSI&lt;br&gt;
&lt;br&gt;
Hello Huy&lt;br&gt;
Yes I tried the uiwait function and it worked for me.&lt;br&gt;
Thanks&lt;br&gt;
Vihang&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 14 Jan 2008 14:39:02 -0500</pubDate>
      <title>Re: how to return a value after a pushbutton is pressed to main function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161490#409296</link>
      <author>Vihang Patil</author>
      <description>Hello&lt;br&gt;
I have created a small demo gui which addresses to the above&lt;br&gt;
said problem. It located here&lt;br&gt;
&lt;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=18212&amp;objectType=file"&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=18212&amp;objectType=file&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
tinyurl version : &lt;a href="http://tinyurl.com/38gk2z"&gt;http://tinyurl.com/38gk2z&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Regards&lt;br&gt;
Vihang&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
