task:12 图形属性设置及习题

题目

在这里插入图片描述

解答

5-1

在这里插入图片描述

>> ezplot('(sin(x))^2/(1+x^2)')
>> axis([-4,4,-0.1,0.45]);grid on

在这里插入图片描述

5-2

在这里插入图片描述

>> x=[0:10:1200];
>> a1=pi/6;a2=pi/4;a3=5*pi/12;
>> y1=x*tan(a1)-(9.8*x.^2)./(2*100*100*cos(a1)*cos(a1));
>> y2=x*tan(a2)-(9.8*x.^2)./(2*100*100*cos(a2)*cos(a2));
>> y3=x*tan(a3)-(9.8*x.^2)./(2*100*100*cos(a3)*cos(a3));
>> plot(x,y1,'-',x,y2,':',x,y3,'*');grid on

在这里插入图片描述

5-3

在这里插入图片描述

>> theta=[0:2*pi];
>> r=-cos(2*theta).*sec(theta);
>> [x,y]=pol2cart(theta,r);
>> subplot(1,2,1);polar(theta,r)
>> subplot(1,2,2);plot(x,y);grid on

(做出来异常奇怪。)

5-4

在这里插入图片描述

>> a=pi/2:4*pi/5:4*pi;
>> A=exp(i*a);
>> x=real(A);
>> y=imag(A);
>> fill(x,y,'y')
>> axis square
>> hold on
>> x1=-1:0.001:1;
>> y1=sqrt(1^2-x1.^2);
>> y2=-sqrt(1^2-x1.^2);
>> plot(x1,y1,x1,y2)

在这里插入图片描述

5-5

在这里插入图片描述

>> bar3(magic(5))
>> colormap(spring)

在这里插入图片描述

5-6

在这里插入图片描述

>> o=[2000 1500 600 200 300 700];
>> [m,i]=max(o)

m =

        2000

i =

     1
>> explode=zeros(size(o));
>> explode(i)=1

explode =

     1     0     0     0     0     0

>> pie(o,explode)

在这里插入图片描述

5-7

在这里插入图片描述

>> a=-pi/2:pi/30:pi/2;
>> b=0:pi/9:pi/4;
>> r1=0.5+0.45*cos(a);
>> r2=0.5+0.39*sin(b);
>> r=[0.5,r1,0.5,0.5,r2];
>> cylinder(r,24)
>> colormap(spring)

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值