📜  在 R 编程中计算一个值的反正切 - atan()函数

📅  最后修改于: 2022-05-13 01:54:51.347000             🧑  作者: Mango

在 R 编程中计算一个值的反正切 - atan()函数

R 语言中的atan()函数用于计算作为参数传递给它的数值的反正切值。

示例 1:

# R code to calculate inverse tangent of a value
  
# Assigning values to variables
x1 <- -1
x2 <- 0.5
  
# Using atan() Function
atan(x1)
atan(x2)

输出:

[1] -0.7853982
[1] 0.4636476

示例 2:

# R code to calculate inverse tangent of a value
  
# Assigning values to variables 
x1 <- 0.224587
x2 <- 0.456732
  
# Using atan() Function
atan(x1)
atan(x2)

输出:

[1] 0.2209213
[1] 0.4284381