문제

I am new to R. any help is welcome. Let's say I have a function A in R that returns a matrix A(x). How i can I compute enter image description here ? I am aware of the existence of integrate, but this function works only with scalar functions. thank you in advance

도움이 되었습니까?

해결책

I would just do a loop for it with rectangles or something.

res=0
for (i in seq(0,1,1/10000)[-10001])
    res=res+A(i)
res=res/10000
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top