<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173346</link>
    <title>MATLAB Central Newsreader - How to plot in GUI data inserted by edit box?</title>
    <description>Feed for thread: How to plot in GUI data inserted by edit box?</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>Sun, 27 Jul 2008 20:13:03 -0400</pubDate>
      <title>How to plot in GUI data inserted by edit box?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173346#445766</link>
      <author>Andr? Zibetti</author>
      <description>Hi guys,&lt;br&gt;
&lt;br&gt;
Could you guys help me to figure out how can I plot (in GUI)&lt;br&gt;
some data points inserted in a edit box (or table) after&lt;br&gt;
confirm by pushing a button??&lt;br&gt;
&lt;br&gt;
I wanna build a GUI that I can insert data point and confirm&lt;br&gt;
one by one and then this points be ploted in same GUI (axes).&lt;br&gt;
&lt;br&gt;
thanks a lot in advance!!</description>
    </item>
    <item>
      <pubDate>Mon, 28 Jul 2008 04:01:08 -0400</pubDate>
      <title>Re: How to plot in GUI data inserted by edit box?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173346#445797</link>
      <author>Andre Zibetti</author>
      <description>&quot;Andr? Zibetti&quot; &amp;lt;shidao@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g6iksf$21p$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi guys,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Could you guys help me to figure out how can I plot (in GUI)&lt;br&gt;
&amp;gt; some data points inserted in a edit box (or table) after&lt;br&gt;
&amp;gt; confirm by pushing a button??&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I wanna build a GUI that I can insert data point and confirm&lt;br&gt;
&amp;gt; one by one and then this points be ploted in same GUI (axes).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks a lot in advance!!&lt;br&gt;
&lt;br&gt;
Hi again, :)&lt;br&gt;
&lt;br&gt;
I think that I already figure out my own question. Here is&lt;br&gt;
the code:&lt;br&gt;
&lt;br&gt;
in GUI callback, immediatly after %vargi... insert:&lt;br&gt;
x=[0]&lt;br&gt;
y=[0]&lt;br&gt;
handles.x=x;&lt;br&gt;
handles.y=y;&lt;br&gt;
&lt;br&gt;
to create your vector and set them in handle structure&lt;br&gt;
&lt;br&gt;
In GUI create the axes, two edit box, 2 static text box and&lt;br&gt;
1 button.&lt;br&gt;
&lt;br&gt;
In the callback button insert the code:&lt;br&gt;
a = get(handles.edit1,'string')&lt;br&gt;
set(handles.text1,'string',a)&lt;br&gt;
X =str2double(a)&lt;br&gt;
&lt;br&gt;
b = get(handles.edit2,'string')&lt;br&gt;
set(handles.text4,'string',b)&lt;br&gt;
Y =str2double(b)&lt;br&gt;
&lt;br&gt;
handles.y(end+1) = Y&lt;br&gt;
handles.x(end+1) = X&lt;br&gt;
&lt;br&gt;
xmin = min(handles.x); ymin = min(handles.y);&lt;br&gt;
xmax = max(handles.x); ymax = max(handles.y);&lt;br&gt;
xx = xmin:0.1:xmax;&lt;br&gt;
yy = spline(handles.x,handles.y,xx)&lt;br&gt;
plot(handles.x,handles.y,'o',xx,yy)&lt;br&gt;
guidata(hObject,handles)&lt;br&gt;
&lt;br&gt;
done!!!&lt;br&gt;
&lt;br&gt;
This is GUI that you can create your plot inserting values&lt;br&gt;
right on edit box in GUI.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
It's not a big deal, but's it my first time that I made&lt;br&gt;
something in matlab GUI, so :))...&lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
  </channel>
</rss>

