10.5: Interactive Fitting Tools

Matlab and Octave Programming for STEM Applications · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    10.5: Interactive Fitting Tools

    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:

    clipboard_ecba969192386a3ae1721dd87fdd2f4b4.png

    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 clipboard_eca10f9ff0bfc3db32ffbf031d8192214.png. 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.

    clipboard_e54a3d818943552f49998f970e49ef7a7.png


    This page titled 10.5: Interactive Fitting Tools was last modified on Sat, 04 Jun 2022 02:32:07 GMT and is shared under a CC BY-NC-SA 4.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.