Anda di halaman 1dari 4

Basics of MATLAB-II

Presented by
T.S.L.V.Ayyarao

Mathematical functions
Function
cos(x)

cosine

sin(x)

sine

tan(x)

tangent

atan(x)

Arc tangent

asin(x)

Arc sine

exp(x)

exponential

sqrt(x)

Square root

log(x)

Natural logrithm

abs(x)

Absolute value

subplot
Creates a figure with multiple graphs
>>Example:
>>x = 0:0.01:2*pi
>>y1 = sin(x);
>>Figure
>>subplot(2,2,1)
>>plot(x,y1)
>>title('First subplot')

Array Operations
Array arithmetic operations are done
element by element
.*

Element-by element multiplication

./

Element-by element division

.^

Element-by element exponentiation

Anda mungkin juga menyukai