Chapter1-1c

# Chapter1-1c - Chapter1 MajorPiecesOfMatlab Commandwindow...

This preview shows pages 1–7. Sign up to view the full content.

The MATLAB Environment Chapter 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Major Pieces Of Matlab Command window History window Documents windows (for editing) Help capabilities Plots Current directory Workspace
MATLAB as a Calculator Inside the command window, you have a  basic calculator, with standard  operations: +,*,-,/ and ^ (exponentiation) ( ) Order of operations (PEMDAS) % for comments

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Defining Variables Examples:  x =10 Y=x    (assuming x had previous been given a value as shown  above) A1=3 Volume=(4/3)*pi*radius^3  (pi is a predefined variable  and assuming radius had previous been assigned a value – not  shown) Using the semicolon
Naming Variables VERY IMPORTANT! MUST begin with a letter (a-z or A-Z). Followed by any combination of letters, numbers (0- 9) and the underscore (_) characters. (NO OTHER  CHARACTERS!) Maximum length of 63 characters but a max of 8  should be sufficient (abbreviate as necessary). MATLAB variables are case-sensitive (Cost, cost  and coSt are all different. I suggest you stick with all  lower case. Use the above for filenames (you’ll stay out of trouble).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
3 Sequential Coding  Examples Class Example1_1 (Cost of an item) Class Example1_2 (Deg F -> Deg C)
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/13/2010 for the course EGR EGR115 taught by Professor Newman during the Spring '10 term at Embry-Riddle FL/AZ.

### Page1 / 16

Chapter1-1c - Chapter1 MajorPiecesOfMatlab Commandwindow...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online