z = peaks (); h = meshz (z(20:30, 20:30)); print -dpng tst.png cdat = get (h, 'cdata'); cdat(1:5, 1:5) ans = 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 1.8168 3.4790 3.7573 3.6990 1.8168 1.8168 3.1565 3.5507 3.6013 1.8168 1.8168 2.6313 3.1121 3.2505 zdat = get (h, 'zdata'); zdat(1:5, 1:5) ans = -0.1237 -0.1237 -0.1237 -0.1237 -0.1237 -0.1237 -0.1237 3.4790 3.7573 3.6990 -0.1237 3.4790 3.4790 3.7573 3.6990 -0.1237 3.1565 3.1565 3.5507 3.6013 -0.1237 2.6313 2.6313 3.1121 3.2505 xdat = get (h, 'xdata'); xdat(1:5, 1:5) ans = 0 0 0 1 2 0 0 0 1 2 0 0 0 1 2 0 0 0 1 2 0 0 0 1 2 ydat = get (h, 'ydata'); ydat(1:5, 1:5) ans = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 diary off