Skip to main content\(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 10.4 Practice Your Curve Fitting
Activity 10.1.
A set of seven points is given by:
\((0.9, 0.9), (1.5, 1.5), (3, 2.5), (4, 5.1), (6, 4.5), (8, 4.9), (9.5, 6.3)\text{.}\)
Fit a polynomial of degree 3 to this data and plot this polynomial along with the seven points.
Challenge: Create six plots in one figure (use subplots) like the one above, but fitting polynomials of degrees 1, 2, 3, 4, 5, and 6 to the data.
Please put your MATLAB code into the textbox.
Activity 10.2.
Given the previous data, use interpolation to approximate the y-value when
\(x = 5\) using:
-
nearest
-
linear
-
spline interpolation
Please put your MATLAB code into the textbook.