Stu*_*nce 2 math r graph function figure
我想在R中复制这个数字,而不是只是数据范围和功能信息的表.问题在于其中一些功能,在R中完成所有这些功能.例如反双曲正弦,......?!谢谢
eq <- function(x) {arcsinh(x)}
tmp <- data.frame(x=1:50, y=eq(1:50))
p <- qplot(x, y, data=tmp, xlab="X-axis", ylab="Y-axis")
c <- stat_function(fun=eq)
print(p + c)
Run Code Online (Sandbox Code Playgroud)
其中一些是基地.
cosh(x)
sinh(x)
tanh(x)
acosh(x)
asinh(x)
atanh(x)
Run Code Online (Sandbox Code Playgroud)
但这省去了acsch(x),asech(x)和acoth(x).您可以使用日志创建这些.
例如,acsch(x)等于ln((1/x)+(sqrt(1 + x ^ 2)/ abs(x))),即
plot(log(1/((-100:100)/100)+sqrt(1+(((-100:100)/100))^2)/abs((-100:100)/100)))
另外两个可以在这里找到http://en.wikipedia.org/wiki/Hyperbolic_function