【发布时间】:2020-04-24 21:27:13
【问题描述】:
f <- function(x) {((1/2)*((4*x)-1)*exp(-(1/2)*((3*x)+(2*x^2))))};
f # order of arguments reversed
h <- function(x) integrate(f, lower=0, upper=Inf, x=x)$value;
h
g <- Vectorize(h);
g
x <- seq(0,100)
plot(x,g(x), xlab="x", ylab="y", col="blue")
【问题讨论】:
标签: r function variables plot integrate