getting started with matlab (part 3) 1. algebra, 2. trig 3. the keyword ans 4. clean up and suppress...

13
Getting Started with MATLAB (part 3) 1. Algebra, 2. Trig 3. The keyword ans 4. Clean up and suppress output: finalizing the software’s presentation 1

Upload: lesley-cameron

Post on 13-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 8: Getting Started with MATLAB (part 3) 1. Algebra, 2. Trig 3. The keyword ans 4. Clean up and suppress output: finalizing the software’s presentation 1

4. Polishing the final product

clear <enter> typed inside the command window Will delete all the variables in the Workspace this time. There is

no going back. This cleans up every variable from memory. (No more little yellow boxes in the Workspace)

clc <enter> typed inside the command window Will completely erase the content of the command window. It

does not affect the Workspace - the variables still exist and can be used.

8

Page 13: Getting Started with MATLAB (part 3) 1. Algebra, 2. Trig 3. The keyword ans 4. Clean up and suppress output: finalizing the software’s presentation 1

Wrapping Up Algebra reminders

Order of Operations: Parentheses Exponent Multiplication and Division are the same precedence Addition and Subtraction are the same precedence

Trigonometry MATLAB standard trig functions use radians by default

e.g. sin() uses radians; sind() uses degrees

Suppressing the output: Use a semi-colon at the end of calculations

13