Professional Documents
Culture Documents
K(1,:) = [];
K(:,1) = [];
F(1) = [];
U = K\F;
U = [1.5;U];
t = 0:0.01:pi;
Ue = t-sin(t)+3./2.*cos(t);
plot(x,U,'- .',t,Ue)
return
%-------------------------------------------
% Calcul de la matrice Ke et du vecteur Fe
%-------------------------------------------
function [Ke,Fe] = MatElt2Nd(x1,x2)
Ke1 = 1/(x2-x1)*[ -1 1
1 -1 ] ;
Ke2 = (x2-x1)/6* [ 2 1
1 2];
Ke = Ke1 + Ke2 ;
Fe = (x2-x1)/6 * [2*x1+x2; 2*x2+x1];
return
n=
20
ans =
1.5000
1.4815
1.4304
1.3519
1.2517
1.1362
1.0121
0.8863
0.7658
0.6573
0.5673
0.5021
0.4670
0.4667
0.5051
0.5851
0.7087
0.8766
1.0886
1.3433
1.6384