Learn R Programming

astrolibR (version 0.1)

polyidl: Calculate polynomial

Description

Calculate polynomial following IDL's poly.pro function

Usage

polyidl(x,cc)

Arguments

x
scalar, vector or array
cc
vector of polynomial coefficients for polynomial of degree length(cc)-1

Value

  • This function returns the quantity cc[1] + cc[2]*x + cc[3]*x^2 + cc[4]*x^3 + ...

References

See http://www.exelisvis.com/docs/POLY.html

Examples

Run this code
polyidl(2:4, 3:5)  # returns 31,60,99

Run the code above in your browser using DataLab