Genfit
Genfit
This example worksheet uses a generalized least-squares fitting procedure that is built into
Mathcad to find the optimal fit parameters for an arbitrary (nonlinear) model function.
The data is from Taylor 2nd ed, problem 8.25. The rate at which a radioactive material emits
radiation (and number of remaining radioactive nuclei) is expected to decrease exponentially
with time. The two data vectors are "x", the elapsed time t (in min), and "y": the number of
counts in a 15-second interval.
Raw Data:
10
20
x := 30
40
50
409
304
y := 260
192
170
n := rows ( x)
n=5
i := 0 .. n 1
500
400
y
300
200
100
20
40
60
f( x , , ) := e
dfd ( x , , ) := e
dfd ( x , , ) := x e
f( x , a0 , a1)
F ( x , a) := dfd ( x , a0 , a1)
dfd x , a , a
( 0 1)
500
0.5
a :=
:= genfit( x , y , a , F)
= 505.3
= 0.023
t := 0 , 0.1 .. 60
= 43.392
Use this dummy variable to plot the fit so that it looks like a
smooth curve through 600 points.
600
500
400
y
f (t , , )
300
200
100
0
10
20
30
40
50
60
x, t
SSD :=
( yi f( xi , , ) )
SSD
= 10.1
n