<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169360</link>
    <title>MATLAB Central Newsreader - Exporting data from .fig to matlab</title>
    <description>Feed for thread: Exporting data from .fig to matlab</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>Fri, 16 May 2008 02:15:16 -0400</pubDate>
      <title>Exporting data from .fig to matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169360#432404</link>
      <author>Suske</author>
      <description>Hi there:&lt;br&gt;
i have a figure .fig, from which i lost the data and i want to export the data into matlab, without needing to copy point by point. I tried from properties, Xdata and Ydata, but for that i would have to copy point by point (and there are a loooot of them). &lt;br&gt;
Can someone help me? I believe there is an easier way....&lt;br&gt;
&lt;br&gt;
Tanks in advance!&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 16 May 2008 20:04:32 -0400</pubDate>
      <title>Re: Exporting data from .fig to matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169360#432584</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;7246882.1210904146653.JavaMail.jakarta@nitrogen.mathforum.org&amp;gt;,&lt;br&gt;
Suske  &amp;lt;susana.cruz2008@gmail.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;i have a figure .fig, from which i lost the data and i want to export&lt;br&gt;
&amp;gt;the data into matlab, without needing to copy point by point. I tried&lt;br&gt;
&amp;gt;from properties, Xdata and Ydata, but for that i would have to copy&lt;br&gt;
&amp;gt;point by point (and there are a loooot of them).&lt;br&gt;
&amp;gt;Can someone help me? I believe there is an easier way....&lt;br&gt;
&lt;br&gt;
It is not clear to me why you think you would have to copy point by&lt;br&gt;
point?&lt;br&gt;
&lt;br&gt;
alllines = findobj('Type',line');&lt;br&gt;
nlines = length(alllines);&lt;br&gt;
thepoints = cell(nlines,2);&lt;br&gt;
for K = 1:nlines&lt;br&gt;
&amp;nbsp;&amp;nbsp;thepoints{K,1} = get(alllines(K),'XData');&lt;br&gt;
&amp;nbsp;&amp;nbsp;thepoints{K,2} = get(alllines(K),'YData');&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
What happens after this depends on the structure of your plot and&lt;br&gt;
how much of that structure you want to preserve.&lt;br&gt;
&lt;br&gt;
This code depends upon your plot being composed of lines, not surfaces&lt;br&gt;
or patches or contours... you didn't say.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;"The beauties of conception are always superior to those of&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;expression."                               -- Walter J. Phillips&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 17 May 2008 07:50:03 -0400</pubDate>
      <title>Re: Exporting data from .fig to matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169360#432629</link>
      <author>aasim Azooz</author>
      <description>Suske &amp;lt;susana.cruz2008@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;7246882.1210904146653.JavaMail.jakarta@nitrogen.mathforum.o&lt;br&gt;
rg&amp;gt;...&lt;br&gt;
&amp;gt; Hi there:&lt;br&gt;
&amp;gt; i have a figure .fig, from which i lost the data and i &lt;br&gt;
want to export the data into matlab, without needing to &lt;br&gt;
copy point by point. I tried from properties, Xdata and &lt;br&gt;
Ydata, but for that i would have to copy point by point &lt;br&gt;
(and there are a loooot of them). &lt;br&gt;
&amp;gt; Can someone help me? I believe there is an easier way....&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Tanks in advance!&lt;br&gt;
If you can be satisfied with approximate reproduction of &lt;br&gt;
the data, you can try the program 'convert' you can &lt;br&gt;
download it from the file exchange it may help&lt;br&gt;
Aasim Azooz&lt;br&gt;
&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
