Plot 3D surface with values

1 visualizzazione (ultimi 30 giorni)
Jean
Jean il 3 Gen 2015
Risposto: Star Strider il 4 Gen 2015
Goodnight everybody,
I have a matrix A of 4 columns containing my data. The first 3 columns contains x, y and z coordinates of my points and the fourth the pressure. I am looking for a function that display a surface colored in function of the value of the 4th column. I tried plot3c but I have points but no surfaces. I have tried mesh, surface and so but I have problems using it in 3D. Could somebody help me please?
Thank-you!

Risposte (2)

Pacman Pacman
Pacman Pacman il 3 Gen 2015
Modificato: Pacman Pacman il 3 Gen 2015
Hi Jean,
Perhaps you could try using surf again using four input arguments? surf(X,Y,Z,C) might give you what you are looking for: "surf(X,Y,Z,C) uses C to define color. MATLAB® performs a linear transformation on this data to obtain colors from the current colormap." This and additional information can be found at :
Hope this helps; not sure what you meant when you said " I have tried mesh, surface and so but I have problems using it in 3D." Perhaps if this doesn't work you could describe what problems you are having in greater detail.

Star Strider
Star Strider il 4 Gen 2015
What are X, Y, and Z? I have a general idea of what you’re doing, but you have to be creative if you are going to plot 4-dimensional data in a 3-dimensional universe.
I would consider a stem3 plot, with different colours for the markers for different pressure values, but beyond that I have no ideas.

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by