Roots of a function: Difference between revisions
Content deleted Content added
m →{{header|Octave}}: lang matlab to lang octave; even since a lot of langs got messed up with the geshi update:/ (matlab too, it seems) |
|||
Line 420:
If the equation is a polynomial, we can put the coefficients in a vector and use ''roots'':
<lang
r = roots(a);
% let's print it
Line 435:
{{trans|Python}}
<lang
y = x.^3 -3.*x.^2 + 2.*x;
endfunction
|