필터 지우기
필터 지우기

Plotting a column of a matrix as function of the others

조회 수: 2 (최근 30일)
Diego Soler Polo
Diego Soler Polo 2018년 6월 4일
댓글: Diego Soler Polo 2018년 6월 4일
As the result of a computation, I have a Nx3 matrix (N is huge). The first column is called X, the second column is called Y and the third column is called Z. I want to plot Z as a function of X and Y, but there's no any particular order in the rows of the matrix and there might be repetitions. I would like to do two things:
1) Plot Z thridimensionally, as in a surface plot
2) Make a color map
How can I do this?
Thanks

답변 (1개)

monika shivhare
monika shivhare 2018년 6월 4일
make a meshgrid using values of X and Y
[x,y] = meshgrid(X,Y);
make a surfaceplot
surf(x,y,Z)
refer to link surface plots
to make a colormap to the surfaceplot refer Change Color Scheme Using a Colormap
  댓글 수: 1
Diego Soler Polo
Diego Soler Polo 2018년 6월 4일
X and Y are so large (they have about 7 million components each) that this doesn't work (MATLAB cannot create the grid). Is there any other way around this?

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

카테고리

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