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
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的顺序对线条命名