用plot函数绘制正弦曲线和余弦曲线
>> x=0:0.1*pi:2*pi;
>> y1=sin(x);谁动了我的奶酪下载
>> y2=cos(x);
>> plot(x,y1,'-.',x,y2,'s',x,y2);
>> x=-40:40;
>> y=(1/2.498*10)*exp((-x.^2)/(2*10^2));
>> plot(x,y);
双月刊
xdata>> title('\alpha=0,\sigma=10的正态分布曲线');
>> xlabel('x');ylabel('概率密度f(x)');
earn money>>
>> x=-pi:.01:pi;
>> y1=sin(x);y2=cos(x);
>> plot(x,y1,'r-',x,y2,'o');
绘制正弦曲线和余弦曲线>> x=-pi:.01:pi;
>> y1=sin(x);y2=cos(x);
>> plot(x,y1,'r-',x,y2,'o');
>> legend('y=sin(x)','y=cos(x)');
用text函数标出log函数的零点>> x=-2:.1:2;
浇水的英文
>> y=x.^2+2*x-3;
>> plot(x,y);tent
bejing>> text(1,0,'\leftarrow零点');
南京动画培训
绘制正弦 余弦和正切曲线
客户经理英文>> x=0:.1:3*pi;
>> y1=sin(x);
>> y2=cos(x);
>> y3=tan(x+eps);
>> subplot(2,2,1:2);plot(x,y1);
>> subplot(2,2,3);plot(x,y1);
>> subplot(2,2,4);plot(x,y3);
为坐标轴添加细网格>> t=0:.02:2*pi;
>> plot(cos(t),sin(t));
>> axis equal;
>> grid minor;
创建两个图形窗口并画图
> a=figure
a =
1
>> x=1:10;y=x;charcoal
>> plot(x,y);
>> b=figure