simp: Numeric Integration Using Simpson's method

Description Usage Arguments Value Author(s) Examples

Description

Numeric Integration using the Simpson Method

Usage

1
simp(y, a = NULL, b = NULL, x = NULL, n = 200)

Arguments

y

y values to integrate

x

x values to integrate over

a

NULL

b

NULL

n

number of divisions defaults to 200

Value

Numeric Value of the integration

Author(s)

Rolf Turner

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 4-x^2-y^2
fun <- function(x, y){
	a <- 4
	b <- x^2
	d <- y^2
	z <- a-b-d
	return(z)
	}
	
a <- fun(seq(-1000,1000,1), seq(-1000,1000,1))
simp(a, x=-1000:1000, n=1000)	

ssefick/StreamMetabolism documentation built on May 30, 2019, 8:43 a.m.