Astronomical Applications Department, U.S. Naval Observatory Linear Least Squares Page 11
=
S
2
=
i 1
N
t
i
2
Y
i
=
T
4
=
i 1
N
t
i
4
,
leastsqrs[0]: Verifying the solution...
=
A
+
+
-
T
3
2
T
4
T
2
S
0
(
)
-
+
T
2
T
3
T
1
T
4
S
1
-
+
T
3
T
1
T
2
2
S
2
,
=
B
+
+
(
)
-
+
T
2
T
3
T
1
T
4
S
0
-
T
2
2
T
4
N S
1
(
)
-
+
T
1
T
2
T
3
N S
2
,
=
C
+
+
-
+
T
3
T
1
T
2
2
S
0
(
)
-
+
T
1
T
2
T
3
N S
1
-
+
T
2
N T
1
2
S
2
:=
tmp
(
)
array
(
)
map
,
x
( )
rhs x
(
)
eval
,
% _subslist
(
)
optimize
(
)
makeproc
,
tmp
=
parameters [
]
, ,
N Y t
, ,
N Y t
proc
(
)
local
;
,
,
,
,
,
,
,
,
,
,
, ,
,
, , ,
t7 t26 t31 t12 t16 t28 t17 t13 t21 t18 t36 t4 t10 tmp t3 t1 t2
:=
tmp
(
)
array ..
1 3 ;
:=
t1
(
)
sum
,
^
[ ]
t i 3
=
i
..
1 N ;
:=
t2
^
t1 2;
:=
t3
(
)
sum
,
^
[ ]
t i 4
=
i
..
1 N ;
:=
t4
(
)
sum
,
^
[ ]
t i 2
=
i
..
1 N ;
:=
t7
(
)
sum
,
[ ]
Y i
=
i
..
1 N ;
:=
t10
(
)
sum
,
[ ]
t i
=
i
..
1 N ;
:=
t12
-
+
t4 t1
t10 t3;
:=
t13
(
)
sum
,
[ ]
t i
[ ]
Y i
=
i
..
1 N ;
:=
t16
^
t4 2;
:=
t17
-
+
t1 t10 t16;
:=
t18
(
)
sum
,
^
[ ]
t i 2 [ ]
Y i
=
i
..
1 N ;
:=
t21
t10 t4;
:=
t26
t3 N;
:=
t28
^
t10 2;
:=
t31
/
(
)
1
-
+
+
-
+
2
t21 t1
t2 N
t16 t4
t26 t4
t3 t28 ;
:=
[ ]
tmp 1
(
)
+
+
(
)
-
t2
t3 t4 t7
t12 t13
t17 t18 t31;
:=
t36
-
+
t21
t1 N;
:=
[ ]
tmp 2
(
)
+
+
t12 t7
(
)
-
t16 t26 t13
t36 t18 t31;
:=
[ ]
tmp 3
(
)
+
+
t17 t7
t36 t13
(
)
-
+
t4 N t28 t18 t31;
tmp
Page 11