> #=================================

> # Uebung 9 Aufgabe 1: Ausgleich

> # Fortsetzung Ue7 A7

> #=================================

> restart; with(linalg):

Warning, new definition for norm

Warning, new definition for trace

> # Modell:

> G:=(x-x[mi])^2+(y-y[mi])^2-r^2=0;

[Maple Math]

> simplify(G);

[Maple Math]

> # Messungen x_i, y_i fuehren auf: "=0"

> G:=(x[i]-x[mi])^2+(y[i]-y[mi])^2-r^2;

[Maple Math]

> G:=simplify(G);

[Maple Math]

> # substituiere: beta=x_m^2+y_m^2-r^2 (das aendert die Norm!)

> g:=simplify(G-(x[mi]^2+y[mi]^2-r^2)+beta);

[Maple Math]

> # linear in x-m, y_m und beta

> m:=5; n:=4;
x:=vector([-5.0, -3.0, 0.0, 8.0, 13.0]);
y:=vector([-9.0, -2.0, -14.0, 4.0, -1.0]);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> A:=matrix(m,n);

[Maple Math]

> for ii from 1 to m do
A[ii,1]:=-2*x[ii]; A[ii,2]:=-2*y[ii]; A[ii,3]:=1.0;
A[ii,4]:=-(x[ii]^2+y[ii]^2);
od:
A:=evalm(A);

[Maple Math]

> read `../Ue7/givensOQ.src`;

[Maple Math]

> Y[3]:=R[3,4]/R[3,3];
Y[2]:=(R[2,4]-R[2,3]*Y[3])/R[2,2];
Y[1]:=(R[1,4]-R[1,2]*Y[2]-R[1,3]*Y[3])/R[1,1];

[Maple Math]

[Maple Math]

[Maple Math]

> # x_m ist Y_1, y_m ist Y_2 und Y_3=x_m^2+y_m^2-r^2

> ra:=sqrt((Y[1]^2+Y[2]^2)-Y[3]);

[Maple Math]

> res:=sqrt(R[4,4]^2+R[5,4]^2);

[Maple Math]

> kr:=evalm(vector([Y[1],Y[2]])+ra*vector([cos(t), sin(t)]));

[Maple Math]

> pl:=[[x[iii],y[iii]] $iii=1..m];

[Maple Math]

> plot({pl,[kr[1],kr[2], t=0..2*Pi]});

> G;

[Maple Math]

> grad(G,[x[mi],y[mi],r]);

[Maple Math]

> dGA:=(x,y, xm,ym,r)->vector(([-2*x+2*xm, -2*y+2*ym, -2*r]));

[Maple Math]

> GA:=(x,y, xm,ym,r)->(x-xm)^2+(y-ym)^2-r^2;

[Maple Math]

> # Y[1]:=5; Y[2]:=-6; ra:=10;

> Digits:=15;
F0:=vector(m):
for ii from 1 to m do
F0[ii]:=GA(x[ii],y[ii],Y[1],Y[2], ra):
od:
F0:=evalm(F0);
norm(F0,2);

[Maple Math]

[Maple Math]

[Maple Math]

> DF0:=matrix(m,n-1):
for ii from 1 to m do
for jj from 1 to n-1 do
DF0[ii,jj]:=dGA(x[ii],y[ii],Y[1],Y[2], ra)[jj]:
od:
od:
DF0:=evalm(DF0);

[Maple Math]

> A:=augment(DF0,F0);

[Maple Math]

> read `../Ue7/givensOQ.src`;

[Maple Math]

> dr:=R[3,4]/R[3,3];
dy:=(R[2,4]-R[2,3]*dr)/R[2,2];
dx:=(R[1,4]-R[1,2]*dy-R[1,3]*dr)/R[1,1];
res:=sqrt(R[4,4]^2+R[5,4]^2);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> # der Uebergang zu einer anderen Norm hat also keine Konsequenzen gehabt

>