matlab实验8答案详解

matlab实验8答案详解

ID:37712370

大小:51.00 KB

页数:9页

时间:2019-05-29

matlab实验8答案详解_第1页
matlab实验8答案详解_第2页
matlab实验8答案详解_第3页
matlab实验8答案详解_第4页
matlab实验8答案详解_第5页
资源描述:

《matlab实验8答案详解》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、实验八数据处理与多项式计算一、实验目的二、实验内容1、程序:A=rand(1,30000);b=mean(A)std(A,0,2)max(A)min(A)n=0;fori=1:30000ifA(i)>0.5n=n+1;endendp=n/30000结果:(1)b=0.4982ans=0.2889(2)ans=1.0000ans=4.8158e-005(3)p=0.49882.程序:A=45+51*rand(100,5);[Y,U]=max(A)[a,b]=min(A)m=mean(A)s=std(A)sum(A,2)[Y,U]=max(ans)[a,b]=min(a

2、ns)[zcj,xsxh]=sort(ans)结果:(1)Y=95.626695.699595.859595.643995.6975U=279329357a=45.707645.383445.191945.330245.6031b=5789361044(2)m=71.341772.453971.563071.463171.8984s=14.191015.445114.752115.075814.3209(3)Y=428.5552U=98a=294.8629b=41(4)zcj=294.8629304.3951306.0462307.0155307.4650311.0

3、144311.5203315.5695316.4493316.5579317.6092318.0252321.1504324.3965324.5386325.0759325.6970325.7350326.6637327.0061327.4769328.3794328.6685328.8510328.8944330.8695331.3033332.4179332.4514333.2143334.0262335.0851335.5684337.9851339.1718339.4149339.9892340.1515343.3999343.4614343.7944344

4、.8591345.9703348.5857348.6997350.2581350.9037351.6776353.9651356.3746357.0423357.2647361.1787361.9877362.4313364.7428365.6088366.6697367.1449368.1284370.1263371.1219371.1449372.7182373.5121373.7641374.0658374.0876378.0501378.0549379.0053382.9812383.0496383.4662383.8982384.2101386.08833

5、87.1944387.4844387.6648388.1824392.6041393.4056396.0833396.9413401.8044401.9607402.6185403.3431404.1411405.1662408.9670410.0667413.3917415.9679416.2074420.0281423.0012423.0274428.5552xsxh=41661489736422813856844273126762165397719941811519222556310508259454626923325962712364960247837489

6、74534339113581774991538528881479080755379874661709532931640717259868358294320306756576410084983.程序:h=6:2:18;x=6.5:2:18.5;t1=[18,20,22,25,30,28,24];t2=[15,19,24,28,34,32,30];T1=spline(h,t1,x)T2=spline(h,t2,x)结果:T1=18.502020.498622.519326.377530.205126.817823.7966T2=15.655320.335524.9089

7、29.638334.256830.959431.12184.程序:x=1:0.1:101;y1=log10(x);p=polyfit(x,y1,5)y2=polyval(p,x);plot(x,y1,':',x,y2,'-')结果:p=0.0000-0.00000.0001-0.00400.11390.16415.程序:p1=[1,2,4,0,5];p2=[1,2];p3=[1,2,3];p=p1+[0,conv(p2,p3)]%为使两向量大小相同,所以补0A=roots(p)A=[-1,1.2,-1.4;0.75,2,3.5;0,5,2.5];polyval(

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。