- 24
- 0
- 约4.61千字
- 约 5页
- 2016-10-19 发布于贵州
- 举报
用matlab写桃心程序
武夷学院期末考试作品
课程名称:matlab概率与数理统计 姓名:叶丽芳 专业:数应 班级:1
学号: 23
作品名称: 一颗心扑通扑通的狂跳
实验原理与方法:
1.用[X,Y]=meshgrid(x,y)函数定义三维图形的数组 用view函数定义视角以及其它函数定义三维图形颜色等等.
2 用rotata函数来实现对图像的旋转,可以达到动画的效果。
3 用patch函数以及一些数学函数可以制作出心得效果。
作品程序内容:
[x,y,z]=meshgrid(linspace(-3,3,120));
f=(x.^2+(9*y.^2)./4+z.^2-1).^3-((9*y.^2).*(z.^3))./80-(x.^2).*(z.^3);
p=patch(isosurface(x,y,z,f,0));
set(p,FaceColor,r)
xlabel(爱的x轴)
ylabel(爱的的y轴)
zlabel(永恒的Z轴)
title(一颗心扑通扑通的狂跳)
grid on
daspect([2 2 2])
view(3)
try
while 1
rotate(p,[0 0 1],1)
drawnow
end
end
[x,y,z]=meshgrid(linspace(-3,3,120));
f=(x.^2+(9*y.^2)./4+z.^2-1).^3-((9*y.^2).*(z.^3))./80-(x.^2).*(z.^3);
p=patch(isosurface(x,y,z,f,0));
set(p,FaceColor,r)
xlabel(爱的x轴)
ylabel(爱的的y轴)
zlabel(永恒的Z轴)
title(一颗心扑通扑通的狂跳)
grid on
daspect([2 2 2])
view(3)
axis vis3d
try
for i=0:inf
rotate(p,[0 0 1],1)
drawnow
end
end
作品结果或者效果:
小结注意事项:
本学期对matlab进行了初步的学习,并进行了相关的实验操作,对该实验的基本操作也有了初步的认识,知道了如何运用函数来描绘出三维的图形并使该图形进行适当的旋转以及视角,本实验就是在经过很多次实验之后综合所学运用绘制的,实验过程相对比较简单,这让我认识到了matlab这个工具的强大之处,在这次设计过程中要不断地运行和调试,不可能一写就会成功,所以要细心,多思考点,不懂得马上去查阅书籍或者百度。
成绩(百分制)__________ 教师签字:__________
investigators carefully to verify that such credit party authenticity, when necessary, to the borrower unit verification and should strictly distinguish between regular employees, temporary employees, categories and on the job, retirement, early retirement, etc. Purpose to verify investigators should require borrowers to provide proof of use data and verified to ensure that lending purposes should be consistent with the relevant laws and regulations and national policies. Bank ban on issuing personal loans without specified uses. Personal loans should be a sharp distinction between consumer and business uses, management personal loans should refer to working capital loans required to verify authenticity, consumer loans should ensure a clear, true and reasonable. Strictly guard against borrowers will
原创力文档

文档评论(0)