Lu decomposition help needed
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Particle & Nuclear Physics in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!