Main Content

tand

R2026b

Tangent of argument in degrees

Description

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

example

Examples

collapse all

Compute and compare the tangent of 90 degrees and π2 radians. The tangent of 90 degrees is infinite, whereas the tangent of π2 radians is large but finite.

tand(90)
ans = 
Inf
tan(pi/2)
ans = 
1.6331e+16
z = [180+i 15+2i 10+3i];
y = tand(z)
y = 1×3 complex

   0.0000 + 0.0175i   0.2676 + 0.0374i   0.1758 + 0.0539i

Input Arguments

collapse all

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

Data Types: single | double | table | timetable
Complex Number Support: Yes

Output Arguments

collapse all

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

Extended Capabilities

expand all

Version History

Introduced before R2006a

expand all

See Also

| |