2022年MATLAB实验报告 .pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《2022年MATLAB实验报告 .pdf》由会员分享,可在线阅读,更多相关《2022年MATLAB实验报告 .pdf(4页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、年级、专业数学与应用数学姓名卢海宽学号150142009040 名单序号117 实验时间2011 年 11 月 27 日 Matlab 版本2010b 注:实验报告的最后一部分是实验小结与收获实验(6):蒙特卡洛模拟(Monte Carlo Simulation)第 1 页 共 4 页1 Using Monte Carlo simulation,write a Matlab program to calculate an approximation to by considering the number of random points selected inside the quarter
2、 circle 22:1,0,0Qxyxywhere the quarter circle is taken to be inside the square:01,01Sxycount=0;n=10000;for i=1:n x(i)=rand(1);y(i)=sqrt(1-(x(i)2);z=rand(1);if z=y(i)count=count+1;end;end;s=count/nPI=4*s 结果:s=0.7869 PI=3.1476 s=0.7819 PI=3.1276 s=0.7828 PI=3.1312 2.Using Monte Carlo simulation,write
3、a Matlab program to calculate the volume of an ellipsoid(椭球体)22216248xyzcount=0;n=10000;for i=1:n x(i)=sqrt(32)*rand(1);y(i)=8*rand(1);z(i)=sqrt(8*16-4*(x(i)2-2*(y(i)2);u=sqrt(128)*rand(1);if u=z(i)count=count+1;名师资料总结-精品资料欢迎下载-名师精心整理-第 1 页,共 4 页 -年级、专业数学与应用数学姓名卢海宽学号150142009040 名单序号117 实验时间2011 年 1
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年MATLAB实验报告 2022 MATLAB 实验 报告
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内