Plot 3D surface with values
1 view (last 30 days)
Show older comments
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!
0 Comments
Answers (2)
Pacman Pacman
on 3 Jan 2015
Edited: Pacman Pacman
on 3 Jan 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.
0 Comments
Star Strider
on 4 Jan 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.
0 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!