tan
Computes the tangent in radians for each element of x.
📝Syntax
res = tan(x)
📥Input Arguments
Parameter Description
x a numeric value
📤Output Arguments
Parameter Description
res a numeric value
📄Description

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

The tangent function is defined as:

$$\tan(x) = \frac{\sin(x)}{\cos(x)} = \frac{e^{ix} - e^{-ix}}{i(e^{ix} + e^{-ix})}$$

It has vertical asymptotes at

$$x = \frac{\pi}{2} + n\pi$$

for integer n.

💡Examples
A = eye(3, 3);
res = tan(A)
🔗See Also
atan
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub