This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: T4-1City University of Hong Kong Electronic Engineering Semester B 2007-2008 EE3108 Engineering Analysis Tutorial 4 This tutorial focuses on methods of fitting and interpolating given data points. Consider the following data points: x 1 2 4 5 8 9 10 15 17 21 y 1.2 1.8 2.9 3.1 3.5 3.9 4 3.8 4.3 4.5 Plot the data points using Matlab. For clarity, use blue circles to mark the data points. The following discussion first uses linear regression to fit the data. Then, an appropriate transformed linear regression will be used. Finally, interpolation using the Newton basis will be tested. I. Linear regressionLinear regression uses the following formulae to fit the data: and Write on a script file (t0401.m) the steps below: •Calculate Sxx: •Calculate Sx: •Calculate Sxy: •Calculate Sy: •Calculate αand β: Plot the line together with the data points. Is it a good fit? Evaluate the quality of the fit quantitatively: and •Calculate the total squared error ρ:•Calculate the coefficient of determination R2:...
View Full Document
This note was uploaded on 01/11/2011 for the course EE 3108 taught by Professor Nelsonszechunchan during the Spring '07 term at City University of Hong Kong.
- Spring '07