GpplotPolyFit: Plots a polynomial fit in one function call

Description Usage Arguments Value Author(s) See Also Examples

Description

GpplotPolyFit Plots a polynomial fit without the need to define handles

Usage

1

Arguments

x

array with the values of x

y

array with the values of y = f(x)

order

order of the polynomial

Value

none

Author(s)

Oscar Perpi\~n\'an Lamigueiro

See Also

Gpinit

Examples

1
2
3
4
5
6
7
polnorder <- 7# order of the polynomial
npoints <- 20 # number of points to plot
xpoints <- ( 0:npoints ) * 0.1 # x values
wpoints <- c(1,10^ -( 0:polnorder )) # "a" to "h" values
xPower <- outer(xpoints, 0:7, '^')
ypoints <- colSums(wpoints[1:8] * t(xPower))
## Not run: GpplotPolyFit(xpoints, ypoints, 7)

Rgnuplot documentation built on May 1, 2019, 9:17 p.m.