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 –
- Sine (sin)
- Cosine(cos)
- Tangent(tan)
- CoTangent(cot)
- Secant(sec)
- 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:
Matlab
x=34
sin(x)
sind(x)
asin(x)
asind(x)
sinh(x)
asinh(x)
|
Output:
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:
Matlab
x=58
cos(x)
cosd(x)
acos(x)
acosd(x)
cosh(x)
acosh(x)
|
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:
Matlab
x=68
tan(x)
tand(x)
atan(x)
atand(x)
tanh(x)
atanh(x)
|
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:
Matlab
x=45
cot(x)
cotd(x)
acot(x)
acotd(x)
coth(x)
acoth(x)
|
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:
Matlab
x = 89
sec(x)
secd(x)
asec(x)
asecd(x)
sech(x)
asech(x)
|
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)
Matlab
x = 13
csc(x)
cscd(x)
acsc(x)
acscd(x)
csch(x)
acsch(x)
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...