Difference between revisions of "FitPoly Command"

From GeoGebra Manual
Jump to: navigation, search
 
(18 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|statistics}}
{{command|statistics}}
+
;FitPoly( &lt;List of Points>, <Degree of Polynomial> )
; FitPoly[List of Points, Degree n of Polynomial]: Calculates the regression polynomial of degree ''n''.
+
:Calculates the regression polynomial of degree ''n''.
==CAS Specific Syntax==
+
:{{example| 1=<code><nowiki>FitPoly({(-1, -1), (0, 1), (1, 1), (2, 5)}, 3)</nowiki></code> yields ''f(x) = x<sup>3</sup> - 1 x<sup>2</sup> + 1''.}}
In [[CAS View]] the same syntax as above can be used.
+
 
; FitPoly[List of Points, Degree n of Polynomial]: Calculates the regression polynomial of degree ''n''.
+
;FitPoly( &lt;Freehand Function>, <Degree of Polynomial> )
 +
:Calculates the regression polynomial of degree ''n'' for a function drawn by the [[Freehand Shape Tool]].
 +
 
 +
==CAS Syntax==
 +
;FitPoly( &lt;List of Points>, <Degree of Polynomial> )
 +
:Calculates the regression polynomial of degree ''n''.
 +
:{{example| 1=<code><nowiki>FitPoly({(-1, -1), (0, 1), (1, 1), (2, 5)}, 3)</nowiki></code> yields ''x<sup>3</sup> - x<sup>2</sup> + 1''.}}
 +
 
 +
 
 +
{{note| 1=<div>
 +
* For order ''n'' there must be at least ''n + 1'' Points in the list.
 +
* See also [[FitExp Command]], [[FitLog Command]], [[FitPow Command]] and [[FitSin Command]].
 +
* If you work with big/small numbers, you should consider normalizing them for a more accurate result, see  [[Normalize Command]].
 +
</div>}}

Latest revision as of 11:40, 4 February 2019


FitPoly( <List of Points>, <Degree of Polynomial> )
Calculates the regression polynomial of degree n.
Example: FitPoly({(-1, -1), (0, 1), (1, 1), (2, 5)}, 3) yields f(x) = x3 - 1 x2 + 1.


FitPoly( <Freehand Function>, <Degree of Polynomial> )
Calculates the regression polynomial of degree n for a function drawn by the Freehand Shape Tool.

CAS Syntax

FitPoly( <List of Points>, <Degree of Polynomial> )
Calculates the regression polynomial of degree n.
Example: FitPoly({(-1, -1), (0, 1), (1, 1), (2, 5)}, 3) yields x3 - x2 + 1.


Note:
© 2024 International GeoGebra Institute