您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > MATLAB在求解线性方程组中的多种应用
2812Vol.2812200712JOURNALOFTONGHUATEACHERSCOLLEGEDec.2007MATLAB1,2(1.,750021;2.):MATLAB,,.,Matlab,.:;;:O245:A:1008-7974(2007)12-0013-04:2007-04-07:(1980-),,,,,:.,:.:.1,.,,.Cramer,Gauss.1Ax=b,A(nm),(1)m=nA;(2)mn,;(3)nm,.1.1Cramer1Ax=b,D=|A|0,Ax=b,,x1=D1D,x2=D2D,xn=DnD,D1Dib.MATLABdet(A),n+1,CramerAx=b.cramer.m:functionx=cramer(A,b)fork=1:length(b)D=A;D(:,k)=b;x(k)=det(D)/det(A);endx:Gramer,n+1n,N=n!3(n2-1)+n.1.2Matlab,/\,,;,Matlab;,.1.3LU2Ann,ADI0,ALU,.A=L3U,Ax=bLy=bUx=y.lu(A)ALU.:(1)[L,U]=LU(X)(),A=L3U;(2)[L,U,P]=LU(X)(),P3A=L3U.LU,bxzylu.mfunctionx=bxzylu(A,b)n=length(A);[L,U]=lu(A);y=L\b;x=U\yLU,xzylu.m31©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.=xzylu(A,b)n=length(A);[L,U,P]=lu(A);y=L\P3b;x=U\y1.4Cholesky3An,L,A=LTL,L,.CholeskyL,Ax=bLT=bLx=y,cholCholesky,x=L\(XT\b).Cholesky.m.functionx=cholesky(A,b)n=length(A);L=chol(A);L=L;fori=1:ntemp=0;fork=1:i-1temp=temp+L(i,k)3y(k);endy(i)=(b(i)-temp)/L(i,i);endfori=n:-1:1temp=0;fork=i+1:ntemp=temp+L(k,i)3x(k);endx(i)=(y(i)-temp)/L(i,i);endx1.5QRA,QR,Q,R,A=OR,Ax=bQRx=b,x=R\(Q\b).2.,,.,.JacobiGauss-Seidel.2.1JacobiAx=b(ARn,bRn,A),AA,A=D-L-U,D=diag[a11,a22,ann],-L,-UA,X=D-1(L+U)x+D-1b,:x(k+1)=BX(k+1)+f,B=D-1(L+U)=I-D-1A=D-1b.Jacobi.m.functiony=jacobi(A,b,x0,jingdu)ifnargin==3jingdu=1.0e-6;endD=diag(diag(A));U=-triu(A,1);L=-tril(A,-1);B=D\(L+U);f=D\b;n=1;y=B3x0+f;whilenorm(y-x0)=jingdux0=y;y=B3x0+f;n=n+1;endyn2.2Gauss-SeidelAx=b(ARn,bRn,A)X(k+1)=GX(k)+f,G=(D-L)-1U,f=(D-L)-1b,D=diag[a22,a22,,ann],-L,-UA.gauss_seidel.m.functiony=gauss_seidel(A,b,x0,jingdu)ifnargin==3jingdu=1.0e-6;endD=diag(diag(A));U=-triu(A,1);L=-tril(A,-1);G=(D-L)\U;f=(D-L)\b;n=1;y=G3x0+f;whilenorm(y-x0)=jingdux0=y;y=G3x0+f;n=n+1;endyn2.3SOR,JacobiGauss_Seidel,SORGauss_Seidel,,:X(k+1)=LX(k)+f,L=(D-L)-1((1-)D+U),f=(D-L)-1b,[1,2],D-L,-Ugauss-seidel.sor.mfunctiony=sor(A,b,w,x0,jingdu)41©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.==4jingdu=1.0e-6;endD=diag(diag(A));U=-triu(A,1);L=-tril(A,-1);Lw=(D-w3L)\((1-w)3D+w3U);f=(D-w3L)\(w3b);n=1;y=Lw3x0+f;whilenorm(y-x0)=jingdux0=y;y=Lw3x0+f;n=n+1;endyn2.4,,Ax=b(ARn,bRn,A):X(k+1/2)=G1X(k)+fX(k+1)=G2X(k+1/2)+f2G1,G2f1,f2G1=(D-L)-1UG2=(D-U)-1Lf1=(D-L)-1bf2=(D-U)-1bD=diag[a11,a22,,anm],-L,-UA.towstp.m.functiony=towstp(A,b,x0,jingdu)ifnargin==3jingdu=1.0e-6;endD=diag(diag(A));U=-triu(A,1);L=-tril(A,-1);G1=(D-L)\U;f1=(D-L)\b;G2=(D-U)\L;f2=(D-U)\b;n=1;y=G13x0+f1;y=G23y+f2;whilenorm(y-x0)=jingdux0=y;y=G13x0+f1;y=G23y+f2;n=n+1;endyn2.5,,Ax=b,Ab,,A.,Matlab,.,Ab,,.,,.MATLAB,.,,(PCGCGSBICGLSQR).MATLABgmres,bicg,qmr,cgs,x=(A,b).,.,gmres,bicg,qmr,cgs,bicgstab;pcg;minres,symmlq;lsqr.MATLAB,,.,.:[1],.matlabCramer[J]..2004,13(3):129-130.[2].matlab6.5[M].:,2003.[3],,.[M].:,2002.[4],,.Matlab6.0[M].:,2002.(24)51©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.[1].[D].,2004.[2],.[J].,1990(06).[3].[J].,1998(10).[4].[J].,2007(02).TheApplicationofAdaptiveOpticalSysteminSpaceLaserCommunicationLENGXue(SchoolofPhoto-electronicEngineering,ChangchunUniversityofScienceandTechnology,Changchun,Jilin130001)Abstract:Theadaptiveopticalsystemcanreducetheinfluenceofatmosphericturbulenceonspacelasercom2municationsystem,theapplicationofadaptiveopticalsysteminspacelasercommunicationsystemisintroducedinthisarticle.Keywords:spacelasercommunication;adaptiveoptics;phasecompensation(15)TheVariousApplicationsofMATLABinSolvingLinearEquationsZHAOBing-xinetal(CollegeofMathematicsandComputer,NinxiaUniversity,Yinchuan,Ninxia750021)Abstract:MATLABhasbeenthemostpopularsoftwareinscientificandengineeringcomputing,andisoneofthemostexcellentscientificcalculationsoftwarewiththefunctionssuchasnumericalcalculation,graphicprocessing,sign-reducing,wordprocessinganddynamicsimulation,etc.Accordingtothedifferentcharacteristicsoflinearequations,theapplicationsofMatlabarediscussedinsolvinglinearequations,andthecorrespondingsolutionsareprovided.Keywords:linearequations;directmethod;iterativemethod42©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.
本文标题:MATLAB在求解线性方程组中的多种应用
链接地址:https://www.777doc.com/doc-4851929 .html