Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 31 de Dic. de 2015
1 voto
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.
Categorías
Más información sobre Lighting, Transparency, and Shading en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!