Quadratic equation in MATLAB

Example for versions GNU Octave 3.2.3

Octave is suited for numeric computations, so it has built-in methods of solving typical problems, including finding the roots of a polynomial. To do this one can call roots function for a vector of polynomial coefficients listed in order of descending powers (so the coefficient at the highest power is listed first).

roots([2 -3 1])