To make life easier, Matlab includes many standard functions. Each function
is a block of code that accomplishes a specific task.
A D V E R T I S E M E N T
Matlab contains all of the
standard functions such as sin, cos, log, exp, sqrt, as well as many others.
Commonly used constants such as pi, and i or j for the square root of -1, are
also incorporated into Matlab.
sin(pi/4) ans = 0.7071
To determine the usage of any function, type help [function name] at
the Matlab command window.
Matlab even allows you to write your own functions with the function
command; follow the link to learn how to write your own functions and see a
listing of the functions we created for this tutorial.