class15 - PHYS 5900 Class 15 (9/28/2009) Zi-Wei Lin...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PHYS 5900 Class 15 (9/28/2009) Zi-Wei Lin Interpolation If you do not have a proper fitting function for a set of data, you may use Interpolate[ ] . It will find an approximate function for the data by fitting polynomial curves between successive data points, generate an InterpolatingFunction[ ] , which we can operate on (differentiate, integrate, plot, etc). The degree of Interpolation is controlled by InterpolationOrder . Example the monthly CO 2 concentration data collected at the Mauna Loa Observatory, Hawaii, from Jan 1992 to Dec 2002, are given by the following. Plot the data and an interpolating function, then find the local maximum near the 77th month. In[1]:= data = 8 355.98, 356.72, 357.81, 359.15, 359.66, 359.25, 357.03, 355., 353.01, 353.31, 354.16, 355.4, 356.7, 357.16, 358.38, 359.46, 360.28, 359.6, 357.57, 355.52, 353.7, 353.98, 355.33, 356.8, 358.36, 358.91, 359.97, 361.26, 361.68, 360.95, 359.55, 357.49, 355.84, 355.99, 357.58, 359.04, 359.96, 361., 361.64, 363.45, 363.79, 363.26, 361.9, 359.46, 358.06, 357.75, 359.56, 360.7, 362.05, 363.25, 364.03, 364.72, 365.41, 364.97, 363.65, 361.49, 359.46, 359.6, 360.76, 362.33, 363.18, 364., 364.57, 366.35, 366.79, 365.62, 364.47, 362.51, 360.19, 360.77, 362.43, 364.28, 365.32, 366.15, 367.31, 368.61, 369.29, 368.87, 367.64, 365.77, 363.9, 364.23, 365.46, 366.97, 368.15, 368.87, 369.59, 371.14, 371., 370.35, 369.27, 366.94, 364.63, 365.12, 366.67, 368.01, 369.14, 369.46, 370.52, 371.66, 371.82, 371.7, 370.12, 368.12, 366.62, 366.73, 368.29, 369.53, 370.28, 371.5, 372.12, 372.87, 374.02, 373.3, 371.62, 369.55, 367.96, 368.09, 369.68, 371.24, 372.43, 373.09, 373.52, 374.86, 375.55, 375.41, 374.02, 371.49, 370.71, 370.24, 372.08, 373.78 < ; In[2]:= concentration = Interpolation @ data D Out[2]= InterpolatingFunction @88 1., 132.1....
View Full Document

Page1 / 8

class15 - PHYS 5900 Class 15 (9/28/2009) Zi-Wei Lin...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online