Description Usage Arguments Value Author(s) See Also Examples
GpplotPolyFit
Plots a polynomial fit without the need to define handles
1 | GpplotPolyFit(x, y, order)
|
x |
array with the values of x |
y |
array with the values of y = f(x) |
order |
order of the polynomial |
none
Oscar Perpi\~n\'an Lamigueiro
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.