Lu decomposition help needed
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Particle & Nuclear Physics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!