### MATLAB AS CALCULATOR BASIC TUTORIALS

Using MATLAB as a calculator is quite easy. The symbols are the same with most modern scientific calculators:

+ Addition
- Subtraction
* Multiplication
/ Division
^ To the power of

cos(x) The cosine of the value x
sin(x) The sine of the value x
tan(x) The tangent of value x
acos(x) The inverse cosine of the value x
asin(x) The inverse sine of the value x
atan(x) The inverse tangent of value x
cosh(x) The hyperbolic cosine of the value x
sinh(x) The hyperbolic sine of the value x
tanh(x) The hyperbolic tangent of value x
acosh(x) The inverse hyperbolic cosine of the value x
asinh(x) The inverse hyperbolic sine of the value x
atanh(x) The inverse hyperbolic tangent of value x

log2(x) The log to base 2 of x (where 2 can be any value)
log(x) By default the logarithm takes as base “e” (it’s basically the ln )
exp(x) (The exponential in power x)

If you want your result in many decimal places you can write
>>Format long

Before your equation, or if you want the opposite you can write
>>Format short

Matlab also has stored in memory some constants like the greek π which can be written as pi in matlab.
e.g.
>>sin(pi/2)
ans=     1