I have a table with 100 rows and 8 columns. I am trying to plot for any 3 variables from these data. How can i do it?

댓글 수: 1

KSSV
KSSV 2017년 10월 16일
What data is table? It depends on what data you have and what you want to plot.

댓글을 달려면 로그인하십시오.

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2017년 10월 16일

0 개 추천

Have a look at the trisurf function, and if that's not good enough there used to be a couple of similar functions for making surface plots of triangulated meshes.
HTH

댓글 수: 4

Pradeepta Sahu
Pradeepta Sahu 2017년 10월 16일
Unable to obtain the plot.
Pradeepta Sahu
Pradeepta Sahu 2017년 10월 16일
편집: Pradeepta Sahu 2017년 10월 16일
The surface is for only 3 columns out of 8. i can able to find the table by few computations. But facing problem in surface plot as error like: 'Z must be a matrix, not a scalar or vector'.
Yes that is because the surface plots expect the input Z to be a matrix. For data in your format where you wand to connect your points in the vectors X Y and Z to a surface you might have to do a Delaunay-triangulation to generate a number of triangles connecting your points, after that you should be able to use the trisurf function. If your points are in a 10-by-10 grid you could simply reshape the vectors and use surf:
X = reshape(X,[10,10]);
Y = reshape(Y,[10,10]);
Z = reshape(Z,[10,10]);
surf(X,Y,Z)
If that doesn't work use trisurf according to its help.
First just plot the points to see which of the above solutions works for your case:
plot3(X,Y,Z,'*-')
HTH
Pradeepta Sahu
Pradeepta Sahu 2017년 10월 23일
Actually first, i have generated a table for certain intervals using few calculations by giving some experimental data. After this i was trying to plot by using any three columns from the generated table(not the experimental table). At that time, i'm facing errors.

댓글을 달려면 로그인하십시오.

카테고리

태그

질문:

2017년 10월 16일

댓글:

2017년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by