• 大小: 24KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-10
  • 语言: Matlab
  • 标签: Matlab  LU分解  

资源简介

Matlab编写的LU分解解线性方程组,已经调试成功.

资源截图

代码片段和文件信息

%  2014/10/21  17:11
%  This is a self_programmed process implementing the LU decomposition
%  method which is one of the most classic metheds.
function [lux]=lu_le(ab)
y=zeros(size(b));
u=zeros(size(a));
l=eye(size(a));
dim_n=size(a1);
dim_m=size(a2);
% flag=0;
if det(a)==0
    disp(‘The determinant of the coefficient‘‘s matrix is zero !‘);
elseif dim_n~=dim_m
    disp(‘The coefficient‘‘s matrix has unequal rows and columns‘)
else
    u(11)=a(11);
    for i=2:dim_n
        u(1i)=a(1i);
        l(i1)=a(i1)/u(11);
    end
    for r=2:dim_n
        sumt_rr=0;
        for k=1:r-1
            sumt_rr=sumt_rr+l(rk)*u(kr);
        end
        u(rr)=a(rr)-sumt_rr;
        for j=r+1:dim_n
            sumt1=0;
            sumt2=0;
            for k=1:r-1

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1366  2014-10-21 17:12  LU分解\LU\lu_le.m

     文件        189  2014-10-20 22:22  LU分解\LU\mainLU.asv

     文件        185  2014-10-21 17:12  LU分解\LU\mainLU.m

     文件      28955  2014-10-21 17:32  LU分解\LU.docx

     目录          0  2014-10-29 22:14  LU分解\LU

     目录          0  2014-10-29 22:14  LU分解

----------- ---------  ---------- -----  ----

                30695                    6


评论

共有 条评论