-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestingfirstCLaplacecplace.m
More file actions
13 lines (13 loc) · 934 Bytes
/
TestingfirstCLaplacecplace.m
File metadata and controls
13 lines (13 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
A = [-4 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 ; 0 -4 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 ; 1 0 -4 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 ; 0 1 0 -4 0 1 0 0 0 1 0 0 0 0 0 0 0 0 ; 0 0 1 0 -4 0 0 0 0 0 1 0 0 0 0 0 0 0 ; 0 0 0 1 0 -4 0 0 0 0 0 1 0 0 0 0 0 0 ; 1 0 0 0 0 0 -4 0 1 0 0 0 1 0 0 0 0 0 ; 0 1 0 0 0 0 0 -4 0 1 0 0 0 1 0 0 0 0 ; 0 0 1 0 0 0 1 0 -4 0 1 0 0 0 1 0 0 0 ; 0 0 0 1 0 0 0 1 0 -4 0 1 0 0 0 1 0 0 ; 0 0 0 0 1 0 0 0 1 0 -4 0 0 0 0 0 1 0 ; 0 0 0 0 0 1 0 0 0 1 0 -4 0 0 0 0 0 1 ; 0 0 0 0 0 0 1 0 0 0 0 0 -4 0 1 0 0 0 ; 0 0 0 0 0 0 0 1 0 0 0 0 0 -4 0 1 0 0 ; 0 0 0 0 0 0 0 0 1 0 0 0 1 0 -4 0 1 0 ; 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 -4 0 1 ; 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 -4 0 ; 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 -4 ; ];
b = [-3 5 -2 0 -3 0 0 0 0 0 0 -2 -4 0 0 -4 12 5 ]';
x = A \ b;
x = A \ b;
[L, U] = lu(A);
[X,Y] = meshgrid(0:0.1:1, 0:0.1:1);
Z = x(1)*X + x(2)*Y + x(3);
figure;
surf(X,Y,Z);
xlabel('x');
ylabel('y');
zlabel('z');
colorbar;