next Built-in Values
up Music 270a: Matlab Tutorial 1
previous Getting Help


Numerical Computation

Matlab can be used as a calculator. For example, inputing ``3+3'' at the command prompt, Matlab will yield the following:

>> 3+3

ans = 

6

Try using operators for multiplication (`` * ''), division (`` / '') and raising to an exponent (`` ^ ''). You can type ``help ops'' for a list of all the operators in Matlab. Make sure you are aware of operator precedence. The following will yield different answers:

>> 8 * 7 / 4 + 3

ans = 

17

>> 8 * 7 /(4 + 3)

ans = 

8


next Built-in Values
up Music 270a: Matlab Tutorial 1
previous Getting Help

``Music 270a: Digital Audio Processing'' by Tamara Smyth, Department of Music, University of California, San Diego (UCSD).
Download PDF version (matlabtut1.pdf)
Download compressed PostScript version (matlabtut1.ps.gz)

Copyright © 2013-01-07 by Tamara Smyth.
Please email errata, comments, and suggestions to Tamara Smyth<trsmyth@ucsd.edu>