Prev: GUI: How to save a figure as a *.bmp by pressing on a button
Next: How to save a figure as a *.bmp by pressing on a button
From: Blake mei on 3 Jun 2010 12:33 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 3 Jun 2010 14:54
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. |