Plot 4d Using meshgrid
조회 수: 11 (최근 30일)
이전 댓글 표시
Dear, could someone help me please?
I have a file with 4 column.
I would like plot a graphic 4D, where the axis x, y and z are the column from 1 to 3, respectively, and the color code is the column 4.
I built a graphic, is attached, but I would like make a surface. I read it is possible using mesh comand. But I could not.
Thank you advanced
댓글 수: 0
답변 (2개)
Soham Chakraborty
2019년 10월 21일
Hi,
As per my understanding you are able to create a 3-D plot. However, you need guidance in representating an additional column of data using color codes. The above requirement can be sovled using 'mesh' or 'surf' command (for creating mesh or surface plot).
The following example could help you with your requirement:
[X,Y] = meshgrid(-8:.5:8);
Z = sin(X) + cos(Y);
C = X.*Y;
mesh(X,Y,Z,C);
or
[X,Y] = meshgrid(-8:.5:8);
Z = sin(X) + cos(Y);
C = X.*Y;
surf(X,Y,Z,C);
Leonardo Barbosa Torres dos Santos
2019년 10월 21일
편집: Leonardo Barbosa Torres dos Santos
2019년 10월 24일
댓글 수: 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!