Lu decomposition help needed

조회 수: 1 (최근 30일)
dulanga
dulanga 2019년 3월 21일
this is as far as i have got can anyone help me?
function [L,U] = LUdecomp(A)
n = size(A,1); %number of rows
m = size(A,2); %number of cols
% Check to see if the input matrix is a square
if n~=m
error('The input matrix is not square')
end
U = A; %The U matrix will be what is left after G.E. with the matrix A
L = eye(n); %The L matrix will be what is left after G.E. applied to the identity matrix
for i = 1:n-1 %i is the current column that you are trying to create zeros for in U
for j = i+1:n %j is the current row that you are trying to create the zero in

답변 (0개)

카테고리

Help CenterFile Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by