response ex6
This commit is contained in:
parent
f7449c68e0
commit
4cd85941b9
3 changed files with 21 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
clear; clc; close all;
|
||||
pList = [5, 10, 20, 100];
|
||||
nIter = 9;
|
||||
nIter = 5;
|
||||
|
||||
figure;
|
||||
tiledlayout(2,2)
|
||||
|
|
@ -22,6 +22,10 @@ for ip = 1:length(pList)
|
|||
K(1,:) = 0;
|
||||
K(1,1) = 1;
|
||||
F(1) = -atan(p);
|
||||
% GH: Dirichlet boundary conditions at x=+1
|
||||
K(end,:) = 0;
|
||||
K(end,end) = 1;
|
||||
F(end) = atan(p);
|
||||
|
||||
u = K \ F;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue