02-Matlab Fundamentals

02-Matlab Fundamentals - 2: Matlab Fundamentals Chapter...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
2: Matlab Fundamentals 2: Matlab Fundamentals
Background image of page 1

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

View Full DocumentRight Arrow Icon
Sep 20, 2006 13:17 ECOR2606 -- Hassan & Holtz 2 Chapter Objectives Introduction and overview of Matlab command mode and its use in interactive computations. Assignment of numbers (scalars) to variables. Assignment of vectors and matrices to variables; colon operator, linspace and logspace functions. Understand priority rules (for + , * , ^ , etc.) in arithmetic expressions. General understanding of some built-in functions. Use of the Help facilities. Learn how to use vectors to create simple plots of arithmetic expressions.
Background image of page 2
Sep 20, 2006 13:17 ECOR2606 -- Hassan & Holtz 3 2.1 The Matlab Environment Matlab has 3 primary windows: Command Window – enter commands and data, see results. Graphics window – used to display plots and graphs. Edit window – edit m-files (Matlab programs). See next chapter. Command window prompt: >> Enter arithmetic expressions: Result is displayed: ans = 39 Can use the variable 'ans': ans = 50
Background image of page 3

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

View Full DocumentRight Arrow Icon
Sep 20, 2006 13:17 ECOR2606 -- Hassan & Holtz 4 2.2 Assignment Scalar values can be assigned to variables: a = 4 Variable names are case-sensitive : A = 5 (output reformatted for brevity) a = 4 A = 5 Statements (“ commands ”) ending in ';' have output suppressed: Several statements can be on one line: a = 4
Background image of page 4
Sep 20, 2006 13:17 ECOR2606 -- Hassan & Holtz 5 Matlab Workspace Workspace contains variables and their values, functions, etc. Private to each user. Accumulates values and data as you work. Initially empty when Matlab starts except for built-in variables: sqrt of -1 ̶ 3.14159. .. ̶ 2.7183. .. ̶ eps realmin realmax Workspace normally disappears when Matlab exists Can be saved and restored later, on a different machine not usually done, as other techniques (scripts, m-files) are usually better.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 04/14/2010.

Page1 / 31

02-Matlab Fundamentals - 2: Matlab Fundamentals Chapter...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online