Trigonometry
Sine, cosine, and related functions, with results
in radians or degrees
The trigonometric functions in MATLAB® calculate standard trigonometric values in radians or degrees, hyperbolic
trigonometric values in radians, and inverse variants of each function. You can use the
rad2deg
and deg2rad
functions to convert between
radians and degrees, or functions like cart2pol
to convert between
coordinate systems.
Functions
expand all
Sine
sin | Sine of argument in radians |
sind | Sine of argument in degrees |
sinpi | Compute sin(X*pi) accurately |
asin | Inverse sine in radians |
asind | Inverse sine in degrees |
sinh | Hyperbolic sine |
asinh | Inverse hyperbolic sine |
Cosine
cos | Cosine of argument in radians |
cosd | Cosine of argument in degrees |
cospi | Compute cos(X*pi) accurately |
acos | Inverse cosine in radians |
acosd | Inverse cosine in degrees |
cosh | Hyperbolic cosine |
acosh | Inverse hyperbolic cosine |
Tangent
tan | Tangent of argument in radians |
tand | Tangent of argument in degrees |
atan | Inverse tangent in radians |
atand | Inverse tangent in degrees |
atan2 | Four-quadrant inverse tangent |
atan2d | Four-quadrant inverse tangent in degrees |
tanh | Hyperbolic tangent |
atanh | Inverse hyperbolic tangent |
Cosecant
csc | Cosecant of input angle in radians |
cscd | Cosecant of argument in degrees |
acsc | Inverse cosecant in radians |
acscd | Inverse cosecant in degrees |
csch | Hyperbolic cosecant |
acsch | Inverse hyperbolic cosecant |
Secant
sec | Secant of angle in radians |
secd | Secant of argument in degrees |
asec | Inverse secant in radians |
asecd | Inverse secant in degrees |
sech | Hyperbolic secant |
asech | Inverse hyperbolic secant |
Cotangent
cot | Cotangent of angle in radians |
cotd | Cotangent of argument in degrees |
acot | Inverse cotangent in radians |
acotd | Inverse cotangent in degrees |
coth | Hyperbolic cotangent |
acoth | Inverse hyperbolic cotangent |
Hypotenuse
hypot | Square root of sum of squares (hypotenuse) |
Conversions
Degrees/Radians Conversion
deg2rad | Convert angle from degrees to radians |
rad2deg | Convert angle from radians to degrees |
Coordinate Conversion
cart2pol | Transform Cartesian coordinates to polar or cylindrical |
cart2sph | Transform Cartesian coordinates to spherical |
pol2cart | Transform polar or cylindrical coordinates to Cartesian |
sph2cart | Transform spherical coordinates to Cartesian |