Possible to extract data matrix from plot figure?

  • Follow


Hi!

I have a somewhat silly question I think... If you have a matlab figure (.fig) containing a 2D plot, is it possible to extract the matrix of X and Y values from the graph? I only have the figures, not the data.... 
I've tried "h = get(gca)", but I can't find anything in the handle that seems to be the actual data of the graph in the plot...

This may not at all be possible, but I figured I'd ask anyway!=)
Thanks!
Ida
0
Reply Ida 4/20/2010 12:13:04 PM

Dear all,
I just found the solution to my own problem! Seems I was just not looking hard enough.
a = get(gca);
b = h.Children;
b.XData and b.YData gives me the two vectors I want! =) (b(n).XData and b(n).YData gives you graph n if you have many in the axis).
Cheers,
Ida


"Ida Haggstrom" <ida_haggstrom@yahoo.se> wrote in message <hqk5og$8vg$1@fred.mathworks.com>...
> Hi!
> 
> I have a somewhat silly question I think... If you have a matlab figure (.fig) containing a 2D plot, is it possible to extract the matrix of X and Y values from the graph? I only have the figures, not the data.... 
> I've tried "h = get(gca)", but I can't find anything in the handle that seems to be the actual data of the graph in the plot...
> 
> This may not at all be possible, but I figured I'd ask anyway!=)
> Thanks!
> Ida
0
Reply Ida 4/20/2010 12:26:04 PM


1 Replies
758 Views

(page loaded in 0.061 seconds)

Similiar Articles:













7/20/2012 2:16:46 PM


Reply: