# MATLAB for trigonometry, exponential and complex numbers functions

In our first article, Introduction to matlab we have discussed that maltab can be used for solution of complex calculations such as trigonometry, exponential and complex numbers functions. These functions are as follows:

##### Trigonometry functions

In mathematics, trigonometric functions are functions of angles. These functions are used to relate the angles of a triangle with the sides of that triangle. Trigonometric functions are important when studying triangles and modeling periodic phenomena such as waves, sound, and light.

The basic matlab trigonometric functions are sin , cos , tan , cot , sec , and cosec . The inverses, e.g. , arcsin, arctan, etc. , are calculated with asin , atan , etc. The same is true for hyperbolic functions. The argument of these functions must be in radians.

These functions are used as follows in matlab:

sin(pi/6) .50000 cos(pi) -1 (sin(pi/6))^2 + (cos(pi/6))^2 % writing sin^2(pi/6) & cos^2(pi/6) will show some error 1 y = (cosh(x))^2+ (sinh(x))^2 % writing cosh^2(x) & sinh^2(x) will shoe some error compute the y at x = 32*pi y = 0

Sine, cosine, and related functions, with results in radians or degrees:

sin | Sine of argument in radians |

sind | Sine of argument in degrees |

asin | Inverse sine in radians |

asind | Inverse sine in degrees |

sinh | Hyperbolic sine of argument in radians |

asinh | Inverse hyperbolic sine |

cos | Cosine of argument in radians |

cosd | Cosine of argument in degrees |

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 |

##### Exponential

A function whose value is a constant raised to the power of the argument, especially the function where the constant is *e*. The basic matlab exponential functions are exp(x) , log(x) and log10(x).

These functions are used as follows in maltab:

exp(3) 20.0855 log(exp(5)) 5 log10(exp(3)) 1.3029 log10(10^3) 3 exp(pi*sqrt(163)) 2.625 4e+17

##### Complex Numbers

A complex number is a number that can be expressed as follows:

y = a + ib

Matlab recognizes the letters i and j as the imaginary number sqrt(-1).

Where,

a & b are real numbers , *“i”* is known as iota which is a imaginary part and expressed as follows

i = sqrt(-1)

Some standard values of ‘i’

i^0 = 1 i^3 = -i i^6 = -1 i^1 = 1 i^4 = 1 i^7 = -i i^2 =-1 i^5 = i

Complex are used as follows in matlab:

1+3i/1-3i -0.8000 +.0600i exp(i*pi/4) 0.7071 + 0.7071i exp(pi/2*i) 0.0000 + 1.OOOOi Note: result will be different if we write exp(pi/(2*i)) istead of exp(pi/2*i) exp(pi/(2*i)) 0.0000 - 1.OOOOi

I like the helpful info you provide in your articles.

I’ll bookmark your weblog and check again here regularly. I am

quite certain I will learn many new stuff right here!

Good luck for the next!

Hi,

Thanks for review over our article. More article will be coming soon on matlab.

Regards

Ramesh

I am continually invstigating online for articles that can aid me. Thank you!

I see your website needs some unique & fresh content.

Writing manually is time consuming, but there is solution for this hard task.

Just search for; Miftolo’s tools rewriter

Hi HellenCgebd,

Thanks for your valuable suggestion, our team will consider it asap.

Regards

Ramesh

I just want to say I am all new to blogging and actually savored your web site. Likely I’m likely to bookmark your blog post . You amazingly come with really good well written articles. Many thanks for revealing your web-site.