Displaying 1 result from an estimated 1 matches for "problem_area".
2009 Aug 07
0
Problem with area()
I'm using area() to evaluate the area under
2 functions (defined using approxfun()) and the result is in contradiction
with visual inspection (please see:
http://sites.google.com/site/eospansite/dummy/problem_area.jpg
)
The area under the red curve should be larger
than the one under the black curve, but I'm
geting the opposite result using area().
This is what I'm doing:
require(MASS)
f1 <- approxfun(x,y1)
f2 <- approxfun(x,y2)
plot(x,y1,ylim=range(c(y1,y2)))
lines(x,f1(x),col="bla...