博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
matlab plot
阅读量:3905 次
发布时间:2019-05-23

本文共 390 字,大约阅读时间需要 1 分钟。

plot(sin(0:pi/10:2*pi))

在这里插入图片描述hold on plot(sin(0:pi/10:2*pi)); plot(cos(0:pi/10:2*pi)); hold off
通过hold on 与hold off 在一幅图上做多个图形,不然第二个plot会覆盖掉第一个plot画图的线段格式`hold on

plot(sin(0:pi/10:2pi),‘sy-.’);

plot(cos(0:pi/10:2pi),’*:m’);
hold off`

在这里插入图片描述x=0:0.5:4*pi; y=sin(x); h=cos(x); w=1./(1+exp(-x)); g=(1/(2*pi*2)^0.5).*exp((-1.*(x-2*pi).^2)./(2*2^2)); plot(x,y,'bd-',x,h,'gp:',x,w,'ro-',x,g,'c^-');%不需要把四条线拆开来写, legend('sinx','cosx','sigmod','gauss');%按照plot的顺序对线条命名

在这里插入图片描述

转载地址:http://dxmen.baihongyu.com/

你可能感兴趣的文章
NFV SDN
查看>>
SDN Brief Introduction
查看>>
xrange vs range python
查看>>
None Python
查看>>
Naive Pattern Searching
查看>>
Sales Engineer
查看>>
US Shirt Size
查看>>
recursive tree
查看>>
An Introduction to Python Lists
查看>>
gstack - stack trace of a running process
查看>>
strace
查看>>
Mac OS X Install Docker
查看>>
Quickstart containers
查看>>
About the Docker Hub
查看>>
About Docker
查看>>
Hello world in a container
查看>>
Run a simple application
查看>>
Build Your Own Images
查看>>
Networking Containers
查看>>
Manage Data in Containers
查看>>