An interactive introduction to MATLAB

(Jeff_L) #1
4 basic concepts

4 1


3


2


Figure 2: TheMATLABdesktop

The MATLAB desktop
(http://www.eng.ed.ac.uk/teaching/courses/matlab/unit01/MATLAB-

Remember you can desktop.shtml)
pause the screencasts
at any time and try the
examples for yourself. 1.3 basic calculations


MATLABcan perform basic calculations such as those you are used to doing
on your calculator. Listings 1.1–1.5 gives some simple examples (and results)
of arithmetic operations, exponentials and logarithms, trigonometric functions,
and complex numbers that can be entered in the Command Window.
Listing 1.1: Addition
1 >> 4+
2 ans =
3 7
Try usingMATLAB
as an expensive
calculator! Listing 1.2: Exponentiation
1 >> 2^
2 ans =
3 4
Free download pdf