MATLAB程序设计与应用刘卫国(第三版)课后实验答案——13

该博客提供了刘卫国《MATLAB程序设计与应用》第三版的课后实验答案,涵盖了从一到六的部分,但不包括simulaition仿真的解答。建议读者自行查找相关资料完成这部分内容。
摘要由CSDN通过智能技术生成

MATLAB程序设计与应用刘卫国(第三版)课后实验答案——13

h=figure('MenuBar','figure','color','r','WindowButtonDownFcn','disp("Left Button Pressed")')

在这里插入图片描述
在这里插入图片描述

x=-2:0.01:2;
y=1/2.*log(x+sqrt(1+x.^2));
h=line(x,y);
set(h,'color','r','linestyle',':','linewidth',2)
text(1,exp(2),'y=1/2*log(x+sqrt(1+x^2))')

t=-2:0.01:2;
x=t.^2;
y=5.*t.^3;
h1=line(t,x);
set(h1,'color','r','linestyle',':','linewidth',2)
text(-1.5,0,'x=t.^2')
hold on
h2=line(t,y);
set(h2,'color','b','linestyle',':','linewidth',3)
text(1.5,20,'y=5.*t.^3')

x=-2:0.01:2;
y=(1+x.^2)./(1+x.^4);
h=line(x,y);
set(h,'color','r','linestyle',':','linewidth',2)
text(1,1,'y=(1+x.^2)./(1+x.^4)')

x=-2:0.01:2;
y=x.^2.*exp(2*x);
h=line(x,y);
set(h,'color','r','linestyle',':','linewidth',2)
text(1,exp(2),'y=x^2*exp(2*x)')

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

t=-20*pi:0.1*pi:20*pi;
[t,~]=meshgrid(t);
x=t;
y=2.*t.*cos(t);
z=5.*t.*sin(t);
axes('view',[-37.5,30]);
surface(x,y,z)
axis equal

theta=0:0.01*pi:2*pi;
t=0:0.01*pi:2*pi;
[theta,t]=meshgrid(theta,t);
x=2.*cos(theta);
y=2.*sin(theta);
z=t;
axes('view',[-37.5,30]);
surface(x,y,z)

t=0:0.00001:0.001;
[t,x]=meshgrid(t);
v=10*exp(-0.01*x).*sin(2000*pi*t-0.2*x+pi);
axes('view',[-37.5,30]);
h=surface(t,x,v);
title('v=10*exp(-0.01*x).*sin(2000*pi*t-0.2*x+pi)');
xlabel('t'),ylabel('x'),zlabel('v')

y=0:0.01:20;
x=0:0.01:20;
[x,y]=meshgrid(x,y);
z=y.^3;
axes('view',[-37.5,30]);
h=surface(x,y,z);

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

x=0:0.01:2*pi;
y1=sin(x);
y2=cos(x);
y3=tan(x);
y4=cot(x);
subplot(2,2,1);
plot(x,y1);
subplot(2,2,2);
plot(x,y2);
subplot(2,2,3);
plot(x,y3);
subplot(2,2,4);
plot(x,y4);

在这里插入图片描述

t=linspace(0,2*pi,6);
k=t(1:length(t)-1);
patch(sin(k),cos(k),1:length(k),'facecolor','interp');
colormap summer;
axis equal;

在这里插入图片描述

r=150;
a=150;
b=150;
para1=[a-r,b-r,2*r,2*r];
para2=[a-r+300,b-r,2*r,2*r]
rectangle('Position',para1,'Curvature',[1 1],'EdgeColor','r')
hold on 
rectangle('Position',para2,'Curvature',[1 1],'EdgeColor','r')
axis equal

在这里插入图片描述
注:考试范围仅到此,所以simulaition仿真及之后的章节没有作答。由于上次挂了个网址被删啦,若读者需要,请自行查阅相关资料(话说csdn不给返回底稿的吗…)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值