% MATLAB Tutorial - Nuclear Science and Engineering - Spring 2008 % Instructor: Violeta Ivanova, violeta@mit.edu % Faculty: Jacquelyn Yanch, jcyanch@mit.edu % EXERCISE 3 Linear Regression & Curve Fitting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % A. LOAD DATA % Load data from file worlddata.dat using Import Wizard or LOAD % year: calendar year from 1950 to 2000 % N: world population % Nbil: world population in billions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % B. POLYNOMIAL FIT % Fit a quadratic and plot the 95% confidence interval with POLYTOOL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % C. CURVE FITTING TOOL % Use the Curve Fitting Tool to fit different models of Nbil vs. year. % Compare a quadratic fit to an exponential fit and a Gaussian fit. % Compute and compare three predictions for the world population in 2050.