Opening the book…
If you aren’t sure about the fit you want, you can use the interactive fitting tools. We start again by closing any figure windows, clearing out the variables and clearing the Command Window. A short cut to do this could be:
>> close all,clear,clc
Re-enter the data.
>> x=0:5;
>> y=[12,10,9,6,2,0];
>> plot(x,y,'o')
On the figure screen, go to the menu item Tools > Basic Fitting. This will launch a new window:

Now you simply have to select the polynomial(s) that you want to fit (try a few!). You can even see the corresponding equations (and more) using the big arrow button
. If we select the “linear” and “5th degree polynomial” check boxes, and the “Show equations” check box, we will see the equations on the graph itself.

This page titled 9.3: Interactive Fitting Tools was last modified on Sat, 31 Jul 2021 07:26:37 GMT and is shared under a CC BY-NC 3.0 license and was authored, remixed, and/or curated by Troy Siemers (APEX Calculus) via source content that was edited to the style and standards of the LibreTexts platform.
The book could not be loaded just now.