tan

Computes the tangent in radians for each element of x.

📝 Syntax

  • res = tan(x)

📥 Input argument

  • x - a numeric value

📤 Output argument

  • res - a numeric value

📄 Description

tan computes the tangent in radians for each element of x.

The tangent function is defined as: tan(x)=sin(x)cos(x)=eixeixi(eix+eix)\tan(x) = \frac{\sin(x)}{\cos(x)} = \frac{e^{ix} - e^{-ix}}{i(e^{ix} + e^{-ix})}

It has vertical asymptotes at x=π2+nπx = \frac{\pi}{2} + n\pi

for integer n.

💡 Example

A = eye(3, 3);
res = tan(A)

🔗 See also

atan.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?