Polynomial regression: Difference between revisions

Line 427:
Using the built-in "Fit" function.
 
<lang Mathematica>data = Transpose@{Range[0, 10], {1, 6, 17, 34, 57, 86, 121, 162, 209, 262, 321}};
262, 321}};
Fit[data, {1, x, x^2}, x]</lang>
Result:
<pre>1 + 2x + 3x^2</pre>
 
 
=={{header|MATLAB}}==
Anonymous user