3d plot-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
采纳的回答
更多回答(1 个)
Image Analyst
2015-12-31
1 个投票
If your x,y locations are not complete (some coordinates are missing), or not in a perfect grid, then you'll have to get them into a grid using scatteredInterpolant(). After you use scatteredInterpolant(), then you'll have a perfect rectangular gridded image and then you can use surf to map the value into a height above a plane, or you can use imshow() to display it as an image.
类别
在 帮助中心 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!