Plot 3D surface with values

조회 수: 1 (최근 30일)
Jean
Jean 2015년 1월 3일
답변: Star Strider 2015년 1월 4일
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!

답변 (2개)

Pacman Pacman
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.

Star Strider
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.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by