Forrest
Posts:
18
Registered:
8/25/08
|
|
Re: How to extract data points from a plot (can't use 'ginput')
Posted:
Aug 25, 2008 1:17 PM
|
|
Thanks Steve. I just figured it out. Below is what I did for those (like me) who are not very Matlab savy.
First you must open the figure.
openfig('fig1.fig'); %opens the figure
h = findobj(gca, 'Type', 'line'); %gca gets 'handle' %of the open figure %h now has a value of 160.0106, not sure why but don't care
get(h) %displays a list of all the 'tags', one of %which is XData and YData, which contain the %plot data
X = get(h, 'XData'); Y = get(h, 'YData');
Done!
|
|