- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
MATLAB的基本作实验报告
Plot the following graph
(1) Plotting the two curves under one coordinate system with different color
代码:
clear;
x=-pi:pi/1000:pi;
y=sin(x);
plot(x,y,r:);
hold on;
x=-pi:pi/1000:pi;
y=sin(3*x);
plot(x,y,b);
hold off;
xlabel(x轴);
ylabel(y轴);
legend(y=sinx,y=sin(3x));
运行结果:
(2) Plotting the standard normal distribution density function:
代码:
clear;
x=-5:0.05:5;
y=1/sqrt(2*pi)*exp(-x.^2/2);
plot(x,y)
运行结果:
(3)Using ‘subplot’ command to plot 6 curves :
代码:
clear;
x=-5*pi:0.05:5*pi;
for i=1:6
subplot(2,3,i);
y=sin(i*x);
plot(x,y);
end
运行结果:
(4)Plotting the curve:
代码:
clear;
x=-2*pi:0.01:2*pi;
y=sin(2*x);
polar(x,y)
运行结果:
(5)Plotting a series of curves under one polar coordinate system:
代码:
clear;
x=-2*pi:0.01:2*pi;
for a=1:2:5
y=a.*cos(2*x);
polar(x,y);
hold on;
end
运行结果:
2.Plotting the 3-D curves:
代码:
clear
t=-12*pi:0.05:12*pi;
x=t.*sin(t);
y=t.*cos(t);
z=t;
plot3(x,y,z)
运行结果
3. Plotting the surface: (mesh surf contour3)
(1)
代码:
clear
X=-5:0.01:5;
Y=X;
[x,y]=meshgrid(X,Y);
z=x.*y;
mesh(x,y,z)
运行结果:
(2)*
代码:clear;close;
X=-1:0.01:1;
Y=X;
[x,y]=meshgrid(X,Y);
z=x.^2/3+y.^2/2;
mesh(x,y,z);pause
surf(x,y,z);pause
contour3(x,y,z);pause
mesh(x,y,z);
运行结果:
(3)*
代码:
clear
X=-12:0.01:12;
Y=X;
[x,y]=meshgrid(X,Y);
z=sin(sqrt(x.^2+y.^2))./sqrt(x.^2+y.^2);
mesh(x,y,z)
运行结果:
(4)
代码:
clear;
X=-12:0.05:12;
Y=X;
[x,y]=meshgrid(X,Y);
z=0*x+0*y+6;
mesh(x,y,z)
运行结果:
(5)
代码:
clear;
X=-5:0.05:5;
Y=X;
[x,y]=meshgrid(X,Y);
z=cos(y).*sin(x);
mesh(x,y,z)
运行结果:
4. Plotting curves under a polar coordinate system:
(1)*
代码:
clear;
x=-10:0.01:10;
y=5*cos(x)+4;
polar(x,y)
运行结果:
(2)
代码:
clear;
x=-1:0.01:1;
y=5./cos(x)-7;
polar(x,y)
运行结果:
5. (1)Write a function M-file to define the function:
代码:
function y=eg6_1a(t)
if t=0
y=-3*t.^2+5;
else
y=3*t.^2+5;
end
(2)Plot the graph of
您可能关注的文档
最近下载
- 切向流过滤原理.ppt VIP
- 孤独症康复教育人员上岗培训课程考试题库【附答案】.docx VIP
- 教科版(2024)新教材小学二年级科学上册第二单元《3.我们周围的空气》精品课件.pptx
- 孤独症康复教育人员上岗培训课程考试题库【附答案】.docx VIP
- 极值点偏移1-2---极值点偏移定理.doc VIP
- XFUSION超聚变 服务器 (V5及以下) iBMC Redfish 接口说明.pdf VIP
- 景德镇社区工作者考试真题库(2024版).docx VIP
- 海外工程重油发电机组安装施工组织设计(中英文版).doc VIP
- 2025年中考历史复习专项训练:中国古代史选择题100题(原卷版).pdf VIP
- 蓝凌数字化办公OA平台解决方案EKP使用指南.docx VIP
文档评论(0)