Sunday, November 08, 2009

Merge Multiple Matlab files

Yes, there always is... My suggestion is to get the data from the
original figures, then replot. When Matlab saves .fig files, the
original data is stored in the file.

To get to this data, use this procedure (this is just a hint, command
line input in double quotes):
-Open the .fig
-"get(gca)", this gives you the current axis info
-"get(gca,'Children')" gives you the candidates for objects in the
plot that may contain data,
-"fig_objects=get(get(gca,'Children'))" is the info in those objects,
-"fig_objects.XData" and "fig_objects.YData" lets you access the
respective data.

Play around with this, you'll get what you want eventually!

No comments: