AAE-NA-Labs/Direct Methods for Solving Linear Systems/Alg7.m

13 lines
314 B
Matlab
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function [L, U] = Alg7(A)
% ADDME LU Factorization without pivoting
% [L, U] = Alg7(A) decomposes matrix A into U upper triangular matrix and
% L lower unit triangular matrix such, that A = LU.
[m, n] = size(A);
A = Alg1_outer_product_gaussian_elimination(A);
U = triu(A);
L = tril(A, -1) + eye(m);
end