例如,
想把这个函数表示出来
f <- function(x){ t(matrix(c(1/2,x)))%*%matrix(c(x,1/2)) } fun <- integrate(function(x) f, lower=0, upper = 1)
但我意识到这样做不对,f不是关于x的函数,变量x是1*1矩阵中的元素,怎么把矩阵中的元素作为变量提出来呢?