R/int.Simp.R

Defines functions int.Simp

Documented in int.Simp

int.Simp<-function(xs,fxs){
    n<-length(xs)
    h<-xs[2]-xs[1]
    int<-3*(fxs[1]+fxs[n])/8+7*(fxs[2]+fxs[n-1])/6+23*(fxs[3]+fxs[n-2])/24+sum(fxs[4:(n-3)])
    return(int*h)
}

Try the NPCirc package in your browser

Any scripts or data that you put into this service are public.

NPCirc documentation built on Nov. 10, 2022, 5:48 p.m.