您好,欢迎访问三七文档
11、山区地貌:在某山区测得一些地点的高程如下表:(平面区域1200=x=4000,1200=y=3600),试作出该山区的地貌图和等高线图,并对几种插值方法进行比较。方法一:利用插值的方法,绘制山区的地貌图和等高线,采用了5种插值方法,分别是最邻近插值、线性插值、三次样条插值、立方插值、分段线性插值,得到如图1-5所示的图像:图1最邻近插值地貌图(左),等高线(右)图2线性插值地貌图(左),等高线(右)360032002800240020001600120014801500155015101430130012009801500155016001550160016001600155015001200110015501600155013801070150012001100135014501200115010101390150015001400900110010609501320145014201400130070090085011301250128012301040900500700Y/x120016002000240028003200360040002图3三次样条插值地貌图(左),等高线(右)图4立方插值地貌图(左),等高线(右)图5分段线性插值地貌图(左),等高线(右)比较由以上五种插值方法得到的地貌图和等高线图,可以看出,由于两个高度之间直线为最短距离,因此利用最邻近插值得到的地貌图和等高线为直3线,描述的山地地貌为陡崖,对于一般山区的地貌是不符合的;分段线性插值得到的图像随着分段数目的增多,而更加平缓,棱角更加不明显;利用线性插值、三次样条插值和立方插值所得到的图像,较为平滑,更加适合描述该区山地的地貌。图像绘制程序:x=1200:400:4000;y=1200:400:3600;z=[11301250128012301040900500700;13201450142014001300700900850;139015001500140090011001060950;15001200110013501450120011501010;15001200110015501600155013801070;15001550160015501600160016001550;1480150015501510143013001200980];figure(1);meshz(x,y,z)xlabel('X'),ylabel('Y'),zlabel('Z')title('网格面')xi=1200:40:4000;yi=1200:40:3600;figure(2)z1i=interp2(x,y,z,xi,yi','nearest');%最邻近插值%subplot(1,2,1),surfc(xi,yi,z1i)xlabel('X'),ylabel('Y'),zlabel('Z')title('最邻近插值')%subplot(1,2,2),contour(xi,yi,z1i,10,'r');figure(3)z2i=interp2(x,y,z,xi,yi');%subplot(1,2,1),surfc(xi,yi,z2i)xlabel('X'),ylabel('Y'),zlabel('Z')%分段线性插值title('分段线性插值')%subplot(1,2,2),contour(xi,yi,z2i,10,'r');figure(4)z3i=interp2(x,y,z,xi,yi','cubic');4surfc(xi,yi,z3i)xlabel('X'),ylabel('Y'),zlabel('Z')%立方插值title('立方插值')figure(5)z4i=interp2(x,y,z,xi,yi','spline');surfc(xi,yi,z4i)xlabel('X'),ylabel('Y'),zlabel('Z')%三次样条插值%title('三次样条插值')figure(6)z5i=interp2(x,y,z,xi,yi','linear');surfc(xi,yi,z4i)xlabel('X'),ylabel('Y'),zlabel('Z')%线性插值title('线性插值')figure(7)subplot(3,2,1),contour(xi,yi,z1i,10,'r');subplot(3,2,2),contour(xi,yi,z2i,10,'r');subplot(3,2,3),contour(xi,yi,z3i,10,'r');subplot(3,2,4),contour(xi,yi,z4i,10,'r');subplot(3,2,5),contour(xi,yi,z5i,10,'r');%comparefigure(8)contour(xi,yi,z1i,10,'r')title('最邻近插值')figure(9)contour(xi,yi,z2i,10,'r')title('分段线性插值')figure(10)contour(xi,yi,z3i,10,'r')title('立方插值')figure(11)contour(xi,yi,z4i,10,'r')title('三次样条插值')figure(12)5contour(xi,yi,z5i,10,'r')title('线性插值')方法二:针对绘制等高线和地貌图的问题,使用Matlab中的contourf命令绘制等高线,surf命令绘制带阴影的三维曲面图,得到地貌图,如图6所示的地貌图和平面等高线:图6山区地貌图(左),等高线图(右)(1)等高线绘制程序:clc;clf;clear;x=1200:400:4000;y=1200:400:3600;z=[11301250128012301040900500700;13201450142014001300700900850;139015001500140090011001060950;15001200110013501450120011501010;15001200110015501600155013801070;15001550160015501600160016001550;1480150015501510143013001200980];holdonc=contourf(x,y,z,10);clabel(c)(2)地貌图绘制程序:clc;clf;x=1200:400:4000;y=1200:400:3600;z=[11301250128012301040900500700;13201450142014001300700900850;139015001500140090011001060950;15001200110013501450120011501010;15001200110015501600155013801070;15001550160015501600160016001550;1480150015501510143013001200980];figure6surf(x,y,z),view(50,30),holdon2、假定某地某天的气温变化记录数据见下表,误差不超过0.5℃,试找出其这一天的气温变化规律。时刻/h012345678910111213温度/℃1514141414151618202223252831时刻/h1415161718192021222324温度/℃3231292725242220180716对024h的温度进行分析,采用多项式拟合的数学方法,建立温度y和时刻x的模型,利用Matlab编写程序求得多项式方程为:54320.00010.00470.06770.17970.245214.7582yxxxxx拟合所得图像如图7所示:图7温度-时间拟合曲线由图像可以看出,在03h内,温度变化较平缓,在1415℃左右;在414h温度处于上升阶段,在14h出现最高温度32℃;从1524h处于下降阶段,其中在23h时出现了低温7℃。程序:x=0:1:24;y=[15141414141516182022232528313231292725242220180716];plot(x,y,'r*')holdon7a=polyfit(x,y,5);z=a(1)*x.^5+a(2)*x.^4+a(3)*x.^3+a(4)*x.^2+a(5)*x+a(6);plot(x,z)grid;holdoff3、财政收入预测问题:财政收入与国民收入、工业总产值、农业总产值、总人口、就业人口、固定资产投资等因素有关。下表列出了1952-1981年的原始数据,试构造回归预测模型,并利用1982-1990的数据验证模型。年份国民收入(亿元)工业总产值(亿元)农业总产值(亿元)总人口(万人)就业人口(万人)固定资产投资(亿元)财政收入(亿元)1952598349461574822072944184195358645547558796213648921619547075204916026621832972481955737558529614652232898254195682571555662828230181502681957837798575646532371113928619581028123559865994266002563571959111416815096720726173338444196010791870444662072588038050619617571156434658592559013827119626779644616729525110662301963779104651469172266408526619649431250584704992773612932319651152158163272538286701753931966132219116877454229805212466196712491647697763683081415635219681187156568078534319151273031969137221016888067133225207447197016382747767829923443231256419711780315679085229356203556381972183333657898717735854354658197319783684855892113665237469119741993369689190859373693936551975212142549329242138168462692197620524309955937173883444365719772189492597194974393774547231978247555901058962593985655092219792702606511509754240581564890198027916592119498705418965688261981292768621273100072732804968108首先,以国民收入1x、工业总产值2x、农业总产值3x、总人口4x、就业人口5x、固定资产投资6x的数据为全部自变量,采用最小二乘法拟合一个多元回归模型,有123456159.14400.45850.01120.51250.00080.00280.3165xxxxxyx这个回归模型的复判定系数20.9835R,调整复判定系数20.9792R。模型的剩余标准差为32.3848。对模型进行F检验:228.2925F。对各参数进行t检验的结果见表1:t常量1t2t3t4t5t6tt检验值1.18513.3824-0.4746-2.65780.3885-1.87161.6743表16个自变量模型的t检验结果由上述结果得到:F检验通过,复判定系数与调整复判定系数的差距不大;但在t检验中有若干自变量对y的解释作用不明显,在此采用逐步回归的方法对自变量集合进行调整。利
本文标题:数学建模题目
链接地址:https://www.777doc.com/doc-5866310 .html