Mathe III sachen

This commit is contained in:
M.Scholz 2012-05-07 11:54:48 +02:00
parent a26f4eb92b
commit 5b3c967de4
50 changed files with 72 additions and 0 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -0,0 +1,3 @@
function[f] = TestF1(x)
f=1./(1+x.^2);

View File

@ -0,0 +1,3 @@
function[f] = TestF2(x)
f=cos(pi*x);

View File

@ -0,0 +1,26 @@
function[gamma] = gammas(x_i,y_i,n)
% Programm berechnet den Wert des Newtonschen Interpolationspolynoms p
% zu den n+1 Stuetzstellen (x_i(i), y_i(i)) i=1:n+1 an der Stelle x
% Berechne dividierte Differenzen:
f=zeros(n+1,n+1);
for i=1:n+1
f(i,i)=y_i(i);
end
for k=1:n
for j=1:n-k+1
f(j,j+k)=(f(j+1,j+k)-f(j,j+k-1))/(x_i(j+k)-x_i(j));
end
end
% Belege Gamma:
gamma=zeros(n+1,1);
for i=1:n+1
gamma(i,1)=f(1,i);
end

View File

@ -0,0 +1,22 @@
function[p] = newton_interpol(x,x_i,y_i,n)
% Programm berechnet den Wert des Newtonschen Interpolationspolynoms p
% zu den n+1 Stuetzstellen (x_i(i), y_i(i)) i=1:n+1 an der Stelle x
% Berechne gammas:
gamma = gammas(x_i,y_i,n);
% Bereche den Wert des Interpolationsploynoms p an der Stelle x:
p=gamma(1);
for i=2:n+1
p_i=gamma(i);
for j=1:i-1
p_i=p_i.*(x-x_i(j));
end
p=p+p_i;
p_i=0;
end

View File

@ -0,0 +1,18 @@
function[p] = newton_interpol_f(F, n, a, b, xx)
% Programm berechnet den Wert des Newtonschen Interpolationspolynoms p(x) der
% Funktion f zu n+1 Stuetzstellen auf dem Intervall [a,b]
% Berechne Stuetzstellen:
h=(b-a)/n;
x=zeros(n+1,1);
for i=1:n+1
x(i)=a+(i-1)*h
end
y=zeros(n+1,1);
for i=1:n+1
y(i)=feval(F, x(i));
end
p=newton_interpol(xx,x,y,n);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB