evalpoly(coef,z), coef and z REAL matrices with ncols(z)=2*ncols(coef) evalpoly(coef,z,T), coef and z REAL matrices with ncols(z)=ncols(coef) |

evalpoly(coef,z) evaluates polynomials with REAL coefficients in coef for complex arguments specified by z. Specifically, when coef is a n by p REAL matrix and z is a N by 2*p REAL matrix considered as representing a N by p complex matrix Z, evalpoly(coef,z) evaluates Z^n - coefs[1,]*Z^(n-1) - ... - coef[n-1,]*Z - coef[n,], The result is a N by 2*p REAL matrix representing a N by p complex matrix. By definition, evalpoly(coef,polyroot(coef)) should be zero within rounding error. It is an error when ncols(z) != 2*ncols(coef). evalpoly(coef,x,T) does the same except x is considered to be a real rather than complex matrix with ncols(x) = ncols(coef). The result is a matrix with the same dimensions as x and is the same as creal(evalpoly(coef,cmplx(x))) See also topics 'complex_data', cmplx(), creal() and polyroot().

Gary Oehlert 2003-01-15