28320096JournalofLanzhouJiaotongUniversityVol.28No.3June2009:1001-4373(2009)03-0029-03MATLAB*李建章(,730070):设计了水准网数据结构,并根据该数据结构将水准网边和点的相对位置关系以及观测数据已知数据存储在MATLAB矩阵对象中.在MATLAB中编制程序,利用其强大的矩阵计算功能,获取点的最或然高程值.:水准网平差;MATLAB;最小二乘法:P209:AMATLAB,.MATLAB,MATLAB.MATLAB,,MATLAB,,.,,.,MATLAB,,,.11,,,,.ptTablineTab.ptTab.,.lineTab.MATLAB,mat,.1Fig.1Sketchmapoflevelnet23,.,MAT-LAB,.2.1,,..2Fig.2Sketchmapoflines2,i,jhij.j*:2008-05-12:(1974-),,,.28,i,Hi,jHj=Hi+hij.i,j,Hj,iHi=Hj-hij.,,().,,,.[1~3].function[ok,ptTab,lineTab]=getH0(ptTab,lineTab)%.[lineIndex]=getBegin(ptTab,lineTab);iflineIndex==0ok=false;return;end%.[isok,ptTab,lineTab]=caculateH0(ptTab,lineTab,lineIndex);%.ifnot(hOk(ptTab))[ok,ptTab,lineTab]=getH0(ptTab,lineTab);endok=true.3.3Fig.3Flowchartofcalculatingelevation2.2,.,,,,.2,i,jhij,h^ij,vij,x^i,x^j,xi0,xj0,xi,xj,sij,:h^ij=hij+vij=xj-xi+(xj0-xi0)(1)vij=xj-xi+l(2),l=xj0-xi0-hij.i,j,vij=xj+l.j,i,vij=-xi+l.n,n.V=BX+l(3)V=v1v2vn,B=b11b12b1tb21b22b2tbn1bn2bnt,X=x1x2xt,l=l1l2ln,P=p11000p22000pnn.:t.,(3),[vv][4].X=-(BTPB)-BTPl(4),B,Pl,(4).:function[P,B,l,ptTab,lineTab]=getV(ptTab,lineTab)[row,col]=size(lineTab);fori=1:rowlbname=lineTab(i,2);lename=lineTab(i,3);lhh=lineTab(i,4);lbindex=nameToindex(lbname,ptTab);leindex=nameToindex(lename,ptTab);lbH=ptTab(lbindex,2);leH=ptTab(leindex,2);ifptTab(lbindex,4)~=0&ptTab(leindex,4)~=0B(i,ptTab(lbindex,4))=-1;B(i,ptTab(leindex,4))=1;l(i,1)=(-1)*lhh;303:MATLABelseifptTab(lbindex,4)==0&ptTab(leindex,4)~=0B(i,ptTab(leindex,4))=1;l(i,1)=(-1)*(lhh+lbH);elseifptTab(lbindex,4)~=0&ptTab(leindex,4)==0B(i,ptTab(lbindex,4))=-1;l(i,1)=lbH-lhh;endendendP(i,i)=10/lineTab(i,5);end3,[5].1,1,2.1Tab.1Dataofpoints/m1237.4831-2-0-3-0-4-0-2Tab.2Dataoflines/m/km1125.8353.52233.7822.73139.6404.04437.3843.05142.2702.5.3.3Tab.3Differencebetweentworesults/m/m2243.3299243.3303247.1210247.1214239.7457239.746,.4MATLAB,.MATLAB,.MAT-LAB,,.,.,.:[1],,.MATLAB[M].:,2003.[2],.MATLAB[J].,2007(1):76-78.[3].MATLAB[J].,2001(2):39-40.[4].[M].:,2003.[5].[M].:,2003.AdjustmentProgrammingofLevelNetontheBasisofMATLABLIJian-zhang(SchoolofCivilEngineering,LanzhouJiaotongUniversity,Lanzhou730070,China)Abstract:Onthebasisofdatastructuredesigned,therelationofpointsandlinesoflevelnet,thesurveyingdataandtheknowndataarestoredinmatrixobjectinMATLAB.AndaprogramisdesignedinMATLABtogetthevalueofmostprobablebyitsstrongabilityofcalculatingmatrix.Keywords:adjustmentoflevelnet;MATLAB;leastsquaremethod31