Skip to content
Permalink
ba559a7a2d
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
39 lines (24 sloc) 405 Bytes
clear
clc
test_arrays
matrix = A10;
b = ones(length(matrix),1);
[ L U P] = lu(matrix);
width = length(matrix);
odL = [];
odU = [];
dU = diag(U);
n = [];
% next make a U vector
for i = 1:width
n = odU;
odU = diag(U, i)';
odU = [n, odU];
end
% next make a L vector
for i = 1:width
n = odL;
odL = diag(L, -i)';
odL = [n, odL];
end
[ x ] = solve_tridiag(dU,odL,odU,b)