Matlab中使用plot作图

2024-10-12 06:24:32

1、首先我们生成两列数,暂时取名为aa。

Matlab中使用plot作图

3、在plot括号中还有许多可以添加的内容:plot(1:100,aa(:,1),'r.');得到的是红色的点状图。r表示红色,另外还有g(绿色),k(黑色),y(黄色)等。

Matlab中使用plot作图

5、加入图名:title('reference of the names');

Matlab中使用plot作图

7、在图上加图例:legend('red','green','location&垆杪屑丝#39;,'southwest');matlab中location表示位置,后面southwest表示图上的实际位置,上北下南左西右东。

Matlab中使用plot作图
猜你喜欢