Commit 6ab4d654 authored by alge's avatar alge
Browse files

last T/F changes

parent cea3218e
......@@ -151,17 +151,17 @@ points(akima$x,akima$y)
akima.smooth <- interp(akima$x, akima$y, akima$z,
xo=seq(0,25, length=100), yo=seq(0,20, length=100))
image(akima.smooth$x,akima.smooth$y,akima.smooth$z)
contour(akima.smooth$x,akima.smooth$y,akima.smooth$z,add=T)
contour(akima.smooth$x,akima.smooth$y,akima.smooth$z,add=TRUE)
points(akima$x,akima$y)
# use triangulation library to
# show underlying triangulation:
if(library(tripack, logical.return=T))
plot(tri.mesh(akima),add=T,lty="dashed")
if(library(tripack, logical.return=TRUE))
plot(tri.mesh(akima),add=TRUE,lty="dashed")
# use only 15 points (interpolation only within convex hull!)
akima.part <- interp(akima$x[1:15],akima$y[1:15],akima$z[1:15])
image(akima.part$x,akima.part$y,akima.part$z)
contour(akima.part$x,akima.part$y,akima.part$z,add=T)
contour(akima.part$x,akima.part$y,akima.part$z,add=TRUE)
points(akima$x[1:15],akima$y[1:15])
# spline interpolation, use 5 points to calculate derivatives
......@@ -169,7 +169,7 @@ points(akima$x[1:15],akima$y[1:15])
akima.spl <- interp.old(akima$x, akima$y, akima$z,
xo=seq(0,25, length=100), yo=seq(0,20, length=100),ncp=5)
image(akima.spl$x,akima.spl$y,akima.spl$z)
contour(akima.spl$x,akima.spl$y,akima.spl$z,add=T)
contour(akima.spl$x,akima.spl$y,akima.spl$z,add=TRUE)
points(akima$x,akima$y)
# example with duplicate points
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment