From: Blake mei on
I'm pretty new to Matlab.

I have this 2D gui contour map and I want to extract the data in the form of a matrix. Where is the data stored and how do i go about doing so?
From: Walter Roberson on
Blake mei wrote:

> I have this 2D gui contour map and I want to extract the data in the
> form of a matrix. Where is the data stored and how do i go about doing so?

_Which_ data? The values that the contours were overlayed on, or the set of
contours?

get(ContourPlotHandle, 'ZData') %the Z values that were to be contoured



T = findall(ContourPlotHandle, 'Type', 'patch');
allX = get(T, 'XData');
allY = get(T, 'YData');
allZ = get(T, 'ZData');

allX{K}, allY{K} would then contain the X and Y coordinates of an individual
contour line, and allZ{K} would be the height of that contour.