www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RootsOfQuadraticPolynomialExample.m

    %% Roots of Quadratic Polynomial
% Solve the equation $3x^2-2x-4=0$.
%
% Create a vector to represent the polynomial, then find the roots.

% Copyright 2015 The MathWorks, Inc.

p = [3 -2 -4];
r = roots(p)