Polynomial regression II: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
regression = JXG.Math.Numerics.regressionPolynomial(deg,pointlist); | regression = JXG.Math.Numerics.regressionPolynomial(deg,pointlist); | ||
reg = brd.createElement('functiongraph',[regression],{strokeColor:'green'}); | reg = brd.createElement('functiongraph',[regression],{strokeColor:'green'}); | ||
t = brd.createElement('text',[20,40, | |||
function(){ return "r(x) = " + regression.getTerm();} | |||
], | |||
{strokeColor:'black',fontSize:'14px'}); | |||
brd.unsuspendUpdate(); | brd.unsuspendUpdate(); | ||
</jsxgraph> | </jsxgraph> |