Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想集成一个功能x,
x
FUN1 <- function(x, alpha, beta){ x * alpha - beta } FUN2 <- function(alpha beta){ integrate(FUN1(x, alpha,beta), 0,1) }
但它不起作用。
我也试过
FUN2 <- function(alpha beta){ integrate(FUN1, 0,1) }
它也不起作用。
试试这个,并阅读文档,
f1 = function(x, a, b) x * a - b f2 = function(a, b) integrate(f1, 0, 1, a, b) # a and b are passed to f1 through ... f2(3, 4)