>> cd
G:\0训练\code\MATLAB
>> x=[-pi : 0.05 : pi];
>> y=sin(tan(x))-tan(sin(x));
>> plot(x,y)
>> x=[-pi:0.05:-1.8,-1.799:0.001:-1.2,-1.199:0.05:1.2,1.201:0.001:1.8,1.81:0.05:pi];
>> y=sin(tan(x))-tan(sin(x));
plot(x,y)
>> x=[-2:0.02:2];y=1.1*sign(x).*(abs(x)>1.1)+x.*(abs(x)<=1.1);
plot(x,y)
6565
56456
456456
5456
>> x=0:0.01:2*pi;
>> y1=sin(x);
>> y2=0.1*cos(x);
>> plot(x,y1,x,y2,'--')
>> plotyy(x,y1,x,y2)
2
456456
>> theta=0:0.01:6*pi;
>> rho=5*sin(4*theta/3);
>> polar(theta,rho)
>> figure;rho=5*sin(theta/3);polar(theta,rho)
>> figure;rho=5*sin(theta/3);polar(theta,rho)
>> t=0:0.2:2*pi;y=sin(t);
>> subplot(2,2,1),stairs(t,y);subplot(2,2,2),stem(t,y);subplot(2,2,3),bar(t,y);subplot(2,2,4),semilogx(t,y)
ezplot('x^2*sin(x+y^2)+y^2*exp(x+y)+5*cos(x^2+y)',[-10 10]);
subplot(2,2,1),ezplot('x^2*sin(x+y^2)+y^2*exp(x+y)+5*cos(x^2+y)',[-10 10]);
subplot(2,2,2),ezplot('x^2*sin(x+y^2)+y^2*exp(x+y)+5*cos(x^2+y)',[-20 20]);
subplot(2,2,3),ezplot('x^2*sin(x+y^2)+y^2*exp(x+y)+5*cos(x^2+y)',[-50 50]);
subplot(2,2,4),ezplot('x^2*sin(x+y^2)+y^2*exp(x+y)+5*cos(x^2+y)',[-100 100]);