<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255013</link>
    <title>MATLAB Central Newsreader - Load data from workspace to gui</title>
    <description>Feed for thread: Load data from workspace to gui</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by 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>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 30 Jun 2009 17:32:01 -0400</pubDate>
      <title>Load data from workspace to gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255013#661589</link>
      <author>Eli Chmouni</author>
      <description>Hello everyone;&lt;br&gt;
i have created a gui that loads a .mat file and thus save all the variables in the matlab workspace. My second task now is i have 2 edit text boxes and a push button &lt;br&gt;
---&amp;gt;what i want to happen is the user of the gui can enter the name of a variable already existing in the workspace and then click the push button and the value of the variable should appear in the second edit text box (that could be a static text box too)&lt;br&gt;
any help would be appreciated&lt;br&gt;
Thank you </description>
    </item>
    <item>
      <pubDate>Tue, 30 Jun 2009 20:21:01 -0400</pubDate>
      <title>Re: Load data from workspace to gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255013#661644</link>
      <author>Ilya Rozenfeld</author>
      <description>Let 'var' contain the name of the variable you want to be displayed and 'boxHndl' contain handle to the edit box where you want variable to appear&lt;br&gt;
&lt;br&gt;
In the Callback to the button do the following:&lt;br&gt;
&lt;br&gt;
% create box handle variable in the base workspace&lt;br&gt;
assignin('base', 'dispBoxHndl, boxHndl)&lt;br&gt;
&lt;br&gt;
% assign variable value to the box&lt;br&gt;
evalin('base', ['set(boxHndl, ''String'', num2str(' var '))'])&lt;br&gt;
&lt;br&gt;
&quot;Eli Chmouni&quot; &amp;lt;echmouni@gmail.com&amp;gt; wrote in message &amp;lt;h2di6h$8ca$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello everyone;&lt;br&gt;
&amp;gt; i have created a gui that loads a .mat file and thus save all the variables in the matlab workspace. My second task now is i have 2 edit text boxes and a push button &lt;br&gt;
&amp;gt; ---&amp;gt;what i want to happen is the user of the gui can enter the name of a variable already existing in the workspace and then click the push button and the value of the variable should appear in the second edit text box (that could be a static text box too)&lt;br&gt;
&amp;gt; any help would be appreciated&lt;br&gt;
&amp;gt; Thank you </description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 07:36:01 -0400</pubDate>
      <title>Re: Load data from workspace to gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255013#669342</link>
      <author>Giacomo </author>
      <description>&quot;Ilya Rozenfeld&quot; &amp;lt;rozeni.nospam@alum.rpi.edu&amp;gt; wrote in message &amp;lt;h2ds3d$9f6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Let 'var' contain the name of the variable you want to be displayed and 'boxHndl' contain handle to the edit box where you want variable to appear&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In the Callback to the button do the following:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % create box handle variable in the base workspace&lt;br&gt;
&amp;gt; assignin('base', 'dispBoxHndl, boxHndl)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % assign variable value to the box&lt;br&gt;
&amp;gt; evalin('base', ['set(boxHndl, ''String'', num2str(' var '))'])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Eli Chmouni&quot; &amp;lt;echmouni@gmail.com&amp;gt; wrote in message &amp;lt;h2di6h$8ca$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello everyone;&lt;br&gt;
&amp;gt; &amp;gt; i have created a gui that loads a .mat file and thus save all the variables in the matlab workspace. My second task now is i have 2 edit text boxes and a push button &lt;br&gt;
&amp;gt; &amp;gt; ---&amp;gt;what i want to happen is the user of the gui can enter the name of a variable already existing in the workspace and then click the push button and the value of the variable should appear in the second edit text box (that could be a static text box too)&lt;br&gt;
&amp;gt; &amp;gt; any help would be appreciated&lt;br&gt;
&amp;gt; &amp;gt; Thank you &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Hi Ilya, so if the edit text cell where I want the variable to appear is called for example &quot;edit13&quot; the code on the button for display will be:&lt;br&gt;
assignin('base', 'dispedit13', handles.edit13)&lt;br&gt;
evalin('base', ['set(handles.edit13, ''String'', num2str(' var '))'])&lt;br&gt;
&lt;br&gt;
Correct? Thank you</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 13:33:03 -0400</pubDate>
      <title>Re: Load data from workspace to gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255013#669435</link>
      <author>Ilya Rozenfeld</author>
      <description>It looks like I've made a mistake.  The code should've been&lt;br&gt;
&lt;br&gt;
assignin('base', 'dispBoxHndl', boxHndl)&lt;br&gt;
evalin('base', ['set(dispBoxHndl, ''String'', num2str(' var '))'])&lt;br&gt;
&lt;br&gt;
So in your case it should be like this&lt;br&gt;
&lt;br&gt;
&amp;nbsp;assignin('base', 'dispedit13', handles.edit13)&lt;br&gt;
&amp;nbsp;evalin('base', ['set(dispedit13, ''String'', num2str(' var '))'])&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Giacomo &quot; &amp;lt;bigbig1982@hotmail.com&amp;gt; wrote in message &amp;lt;h4rih1$a0u$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Ilya Rozenfeld&quot; &amp;lt;rozeni.nospam@alum.rpi.edu&amp;gt; wrote in message &amp;lt;h2ds3d$9f6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Let 'var' contain the name of the variable you want to be displayed and 'boxHndl' contain handle to the edit box where you want variable to appear&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; In the Callback to the button do the following:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; % create box handle variable in the base workspace&lt;br&gt;
&amp;gt; &amp;gt; assignin('base', 'dispBoxHndl, boxHndl)&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; % assign variable value to the box&lt;br&gt;
&amp;gt; &amp;gt; evalin('base', ['set(boxHndl, ''String'', num2str(' var '))'])&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &quot;Eli Chmouni&quot; &amp;lt;echmouni@gmail.com&amp;gt; wrote in message &amp;lt;h2di6h$8ca$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Hello everyone;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; i have created a gui that loads a .mat file and thus save all the variables in the matlab workspace. My second task now is i have 2 edit text boxes and a push button &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; ---&amp;gt;what i want to happen is the user of the gui can enter the name of a variable already existing in the workspace and then click the push button and the value of the variable should appear in the second edit text box (that could be a static text box too)&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; any help would be appreciated&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thank you &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hi Ilya, so if the edit text cell where I want the variable to appear is called for example &quot;edit13&quot; the code on the button for display will be:&lt;br&gt;
&amp;gt; assignin('base', 'dispedit13', handles.edit13)&lt;br&gt;
&amp;gt; evalin('base', ['set(handles.edit13, ''String'', num2str(' var '))'])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Correct? Thank you</description>
    </item>
    <item>
      <pubDate>Thu, 30 Jul 2009 18:02:03 -0400</pubDate>
      <title>Re: Load data from workspace to gui</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255013#669541</link>
      <author>Giacomo </author>
      <description>&quot;Ilya Rozenfeld&quot; &amp;lt;rozeni.nospam@alum.rpi.edu&amp;gt; wrote in message &amp;lt;h4s7ef$ahh$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; It looks like I've made a mistake.  The code should've been&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; assignin('base', 'dispBoxHndl', boxHndl)&lt;br&gt;
&amp;gt; evalin('base', ['set(dispBoxHndl, ''String'', num2str(' var '))'])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So in your case it should be like this&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  assignin('base', 'dispedit13', handles.edit13)&lt;br&gt;
&amp;gt;  evalin('base', ['set(dispedit13, ''String'', num2str(' var '))'])&lt;br&gt;
&lt;br&gt;
Thank you very much, I'll try it tomorrow! :)</description>
    </item>
  </channel>
</rss>

