blob: 11afb1bc633f28931239f18baf61ca8d516332ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//LU Decomposition
clearglobal()
clc;
A=[0 2 0 1 0; 2 2 3 2 -2; 4 -3 0 1 -7; 6 1 -6 -5 6]
[L, U, P]=lu(A)
printf('Matrix is')
disp(A)
printf('L=')
disp(L)
printf('U=')
disp(U)
printf('P=')
disp(P)
|