\sum_{l=1}^{n/2-1} W_l = \frac{n-3}{3},
W_l^2 = W_1^2 + (l-1)\Delta^\prime,
where \Delta^\prime = 2/n. This system is again solved by Newton-Raphson formula. The W_l values are then used to get w_l (as with Set A).
To get MathJax to work in Blogger, just go to your Blogger account, click "Design" (top right of the page), and then "Edit HTML". After the first <head> you see, paste
<script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'>
MathJax.Hub.Config({
HTML: ["input/TeX","output/HTML-CSS"],
TeX: { extensions: ["AMSmath.js","AMSsymbols.js"],
equationNumbers: { autoNumber: "AMS" } },
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true },
"HTML-CSS": { availableFonts: ["TeX"],
linebreaks: { automatic: true } }
});
</script>
; Load the data
n = FILE_LINES('daily_area.txt')-1
OPENR, 1, 'daily_area.txt'
a = ''
READF, 1, a
area = FLTARR(6, n)
READF, 1, area
CLOSE, 1
; Extract data between 1977-01-01 and 2011-12-31
initial = WHERE(area[0, *] EQ 1977 AND area[1, *] EQ 1 AND area[2, *] EQ 1)
final = WHERE(area[0, *] EQ 2011 AND area[1, *] EQ 12 AND area[2, *] EQ 31)
time = JULDAY(area[1,*], area[2,*], area[0,*])
x = time[initial:final]
y = REFORM(area[3, initial:final])
nx = N_ELEMENTS(x)
; Compute coefficients of the cubic splines
coeff = SPLINECOEFF(x, y, lambda = 1.d3)
; Plot the original data and the spline function for given lambda
y1 = FLTARR(nx-1)
x1 = x[0:nx-2]
FOR i = 0, N_ELEMENTS(y)-2 DO y1[i] = coeff.d[i] + $
coeff.c[i] * (x[i+1]-x[i]) + $
coeff.b[i] * (x[i+1]-x[i])^2 + $
coeff.a[i] * (x[i+1]-x[i])^3
PLOT, x, y, psym = 3
OPLOT, x1, y1
The only difference between the interpolation, smoothing and fitting of the measurement is in the free parameter \lambda. If \lambda is very small, than the result is the cubic spline interpolation. If \lambda is very large, the measurement is smoothed by cubic splines. In the extreme case, the resulting splines become a linear function. The following animation show how the result change with \lambda:
Address: Instituto de Astrofísica de Canarias (IAC) C/ Vía Láctea, s/n E38205 - La Laguna (Tenerife), España Phone: (+34) 922 60 5746 Email: n.vitas@iac.es |