简体   繁体   English

创建MATLAB 3d图

[英]Creating MATLAB 3d plot

I have a matrix let it be called ARR 我有一个矩阵称为ARR

size(ARR) = 3600 x 140

Where it stands for 3600 seconds, 140 nodes, and in each place ARR(t,n) = value 它代表3600秒,140个节点,并且在每个位置ARR(t,n) = value

How to create a 3d plot to show this ARR? 如何创建3D图以显示此ARR?

When I do surface(ARR) I get nothing, and when I do plot(ARR) I get 140 lines. 当我执行surface(ARR)我什么也没有,而当我执行plot(ARR)我得到了140行。

How in plot(ARR) can I add legend to know which line has which color. 如何在plot(ARR)中添加图例以知道哪条线具有哪种颜色。

You can for instance use surf(ARR) or mesh(ARR) . 例如,您可以使用surf(ARR)mesh(ARR) See the documentation for further usage. 请参阅文档以进一步使用。

For your plot problem you can use legend but it may not be very handy with 140 curves. 对于您的绘图问题,可以使用legend但使用140条曲线可能不太方便。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM