MATLAB: 3d plot-surf

surf

Dear all,
I have a 2d matrix (2358*2) which corresponds to the points of a 2d grid (A: x-y data). These points do not define a rectangle. A second matrix (B: 2358*1) represents a specific variable corresponding to each of the gird points. What I want to show is the a 3D representation of these two matrices; so that I can get the surface of B over the grid points (A). The function 'surface' may work but I could not apply it as I do not have exactly a fully rectangle grid.
What I need to get as the end needs to look like a 3d topography.
Your great help would be appreciated, many thanks.
Reyhaneh

Best Answer

You have a couple of options. We were just discussing them in this other thread. In that case they wanted a 2D color representation, but you can use the same techniques for a 3D surface. In that case, the "pcolor" becomes "surf", and leave the "view(2)" out of the trisurf example.
Related Question