Documentation Center

  • Trials
  • Product Updates

tand

Tangent of argument in degrees

Syntax

Description

example

Y = tand(X) returns the tangent of the elements of X, which are expressed in degrees.

Examples

expand all

Tangent of 90 degrees compared to tangent of π/2 radians

tand(90)
ans =

   Inf
tan(pi/2)
ans =

   1.6331e+16

tand(90) is infinite, whereas tan(pi/2) is large but finite.

Tangent of vector of complex angles, specified in degrees

z = [180+i 15+2i 10+3i];
y = tand(z)
y =

   0 + 0.0175i   0.2676 + 0.0374i   0.1758 + 0.0539i

Input Arguments

expand all

X — Angle in degreesscalar value | vector | matrix | N-D array

Angle in degrees, specified as a real-valued or complex-valued scalar, vector, matrix, or N-D array. The tand operation is element-wise when X is nonscalar.

Data Types: single | double
Complex Number Support: Yes

Output Arguments

expand all

Y — Tangent of anglescalar value | vector | matrix | N-D array

Tangent of angle, returned as a real-valued or complex-valued scalar, vector, matrix, or N-D array of the same size as X.

See Also

| |

Was this topic helpful?