Plotting a column of a matrix as function of the others
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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)
另请参阅
类别
在 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!