VOOZH about

URL: https://www.geeksforgeeks.org/matlab/trigonometric-functions-in-matlab/

⇱ Trigonometric Functions in MATLAB - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Trigonometric Functions in MATLAB

Last Updated : 30 May, 2021

In this article, we are going to discuss trigonometric functions and their types in MATLAB. Trigonometric functions are the mathematical functions that can result in the output with the given input. 

There are six trigonometric functions -

  1. Sine (sin)
  2. Cosine(cos)
  3. Tangent(tan)
  4. CoTangent(cot)
  5. Secant(sec)
  6. CoSecant(csc)

Sine Function

  • sin: Sin function returns the sine of input in radians. The input can be a number or an array or a matrix.

Syntax: sin(value)

  • sind: This function returns the sine of input in degrees.

Syntax: sind(value)

  • asin: This function returns the inverse of sine in radians.

Syntax: asin(x)

  • asind: This function returns the inverse of sine in degrees.

Syntax: asind(x)

  • sinh: This function returns the hyperbolic sine of the value.

Syntax: sinh(x)

  • asinh: This function returns the inverse hyperbolic sine of the value.

Syntax: asinh(x)

Example:

Output:

👁 Image

Cosine Function

  • cos: cos function returns the cosine of input in radians. The input can be a number or an array or a matrix,

Syntax: cos(value)

where value is the input value.

  • cosd: This function returns the cosine of input in degrees.

Syntax: cosd(value)

  • acos: This function returns the inverse of cosine in radians

Syntax: acos(x)

  • acosd: This function returns the inverse of cosine in degrees.

Syntax: acosd(x)

  • cosh: This function returns the hyperbolic cosine of the value.

Syntax: cosh(x)

  • acosh: This function returns the inverse hyperbolic cosine of the value.

Syntax: acosh(x)

Example:

👁 Image

Tangent Function

  • tan: tan function returns the tangent of input in radians. The input can be a number or an array or a matrix,

Syntax: tan(value)

where value is the input value

  • tand: This function returns the tangent of input in degrees.

Syntax: tand(value)

  • atan: This function returns the inverse of tangent in radians

Syntax: atan(x)

  • atand: This function returns the inverse of tangent in degrees.

Syntax: atand(x)

  • tanh: This function returns the hyperbolic tangent of the value.

Syntax: tanh(x)

  • atanh: This function returns the inverse hyperbolic tangent of the value.

Syntax: atanh(x)

Example:

👁 Image

Cotangent Function

  • cot: cot function returns the cotangent of input in radians. The input can be a number or an array or a matrix,

Syntax: cot(value)

where value is the input value

  • cotd: This function returns the co-tangent of input in degrees.

Syntax: cotd(value)

  • acot: This function returns the inverse of co- tangent in radians

Syntax: acot(x)

  • acotd: This function returns the inverse of co-tangent in degrees.

Syntax: acotd(x)

  • coth: This function returns the hyperbolic co- tangent of the value

Syntax: coth(x)

  • acoth: This function returns the inverse  hyperbolic co-tangent of the value

Syntax: acoth(x)

Example:

👁 Image

Secant Function

  • sec: sec function returns the secant of input in radians. The input can be a number or an array or a matrix,

Syntax: sec(value)

where value is the input value

  • secd: This function returns the secant of input in degrees.

Syntax: secd(value)

  • asec: This function returns the inverse of secant in radians.

Syntax: asec(x)

  • asecd: This function returns the inverse of secant in degrees.

Syntax: asecd(x)

  • sech: This function returns the hyperbolic secant of the value

Syntax: sech(x)

  • asech: This function returns the inverse  hyperbolic secant of the value

Syntax: asech(x)

 Example:

👁 Image

CoSecant Function

  • csc: csc function returns the co-secant of input in radians. The input can be a number or an array or a matrix,

Syntax: csc(value)

 where value is the input value

  • cscd: This function returns the co-secant of input in degrees.

Syntax: cscd(value)

  • acsc: This function returns the inverse of co- secant in radians.

Syntax: acsc(x)

  • acscd: This function returns the inverse of co-secant in degrees.

Syntax: acscd(x)

  • csch: This function returns the hyperbolic co-secant of the value.

Syntax: csch(x)

  • acsch: This function returns the inverse hyperbolic co-secant of the value.

Syntax: acsch(x)

👁 Image
Comment