Documentation

This is machine translation

Mouseover text to see original. Click the button below to return to the English version of the page.

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

 `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
 `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
 `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
 `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
 `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
 `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
 `hypot` Square root of sum of squares (hypotenuse)

 `deg2rad` Convert angle from degrees to radians `rad2deg` Convert angle from radians to degrees
 `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