LECTURE_12_CS113_2010

# LECTURE_12_CS113_2010 - CS113 Introduction to Computing for...

This preview shows pages 1–10. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS113 Introduction to Computing for Engineers Curve Fitting and Approximation APPROXIMATION Least Squares Method of Curve Fitting OF DATA Data points ( x i , F i ) can be approximated by a function F = K (x 2-x 1 )+F o such that the function passes close to the data points but does not necessarily pass through them. Goal is to determine K so that the line best fits the measured data. Fitting Data to a Curve: Determining a physical parameter (e.g. spring constant) x Fitting Data to a Curve Prediction of Future Values U.S. Populations [ Census data] Year Population (in millions) 1900 75.996 1910 91.972 1920 105.711 1930 122.775 1940 131.669 1950 150.697 1960 179.323 1970 203.185 1980 226.546 1990 248.710 Can we predict future US populations by fitting historical data to a curve? If so then what curve? Perhaps a 2 nd order polynomial (quadratic) would work. Goal is to find a, b and c so that the curve best fits the data. Fitting Data to a Curve: Example: Calibration of a Sensor A thermistor is small semiconducting sensor whose electrical resistance changes a function of temperature. The problem is that each sensor follows a different (and very non-linear) resistance verses temperature curve. How do we then calibrate each sensor? Goal is to find A, B and C so that the curve best fits the measured R verses T data Steinhart - Hart equation Data points ( x i , y i ) can be approximated by a function y = f ( x ) such that the function passes close to the data points but does not necessarily pass through them. Data Approximation The most common form of data fitting is the least squares method . Data fitting is necessary to model data with fluctuations such as experimental measurements . x y = ax + b, Determine a and b . y Using the least squares algorithm, ensure that all the data points fall close to the straight line/function. Fitting Data With a Linear Function Data points Choice of fitting function ( linear ) Errors between function and data points Sum of the squares of the errors In compact notation Linear Least Squares Algorithm Linear Least Squares Algorithm-cont. Our goal is to determine the values of a and b that will minimize z , the sum of the squares of the errors ....
View Full Document

## This note was uploaded on 02/29/2012 for the course CSC 113 taught by Professor Phillipregali during the Fall '10 term at Catholic University of America.

### Page1 / 31

LECTURE_12_CS113_2010 - CS113 Introduction to Computing for...

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

View Full Document
Ask a homework question - tutors are online