While poly4root computes the (real-valued) roots of a polynomial of fourth degree, poly4rootMat can
be applied to several polynomials of fourh degree at once by assuming that each row the input matrix contains the
coefficients for one of the polynomials.
Usage
poly4root(a)
poly4rootMat(amat)
Arguments
a
a numeric vector of length five specifying the coefficients of the polynomial a[1]*$x^4$ +
a[2]*$x^3$ + a[3]*$x^2$ + a[4]*$x$ + a[5].
amat
a numeric matrix with five columns in which each row contains the five coefficients of a polynomial of
fourth degree.
Value
poly4root, a vector containing the real-valued roots of the polynomial. For poly4rootMat,
a matrix with four columns in which each row contains the real-valued roots of the corresponding polynomial. If
a polynomial has less than four real-valued roots, the remaining entries in the corresponding row are set to NA.