Plot 3D surface with values
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Pacman Pacman
2015-1-3
编辑:Pacman Pacman
2015-1-3
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 个评论
Star Strider
2015-1-4
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!