Lecture_02_horowitz

# Lecture_02_horowitz - 1 E7 INTRODUCTION TO COMPUTER E7...

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

E7 L2 1 E7: INTRODUCTION TO COMPUTER E7: INTRODUCTION TO COMPUTER PROGRAMMING FOR SCIENTISTS AND PROGRAMMING FOR SCIENTISTS AND ENGINEERS ENGINEERS Lecture Outline 1. Matlab basics 2. Matlab as a calculator 3. Saving and loading files in matlab Copyright 2007, Horowitz, Packard. This work is licensed under the Creative Commons Attribution-Share Alike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

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

View Full Document
E7 L2 2 Matlab basics The default MATLAB Desktop
E7 L2 3 Matlab basics Starting Matlab double-click the Matlab icon, or use Start, Run…, type matlab , and return The Command Window and the Matlab prompt >>

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

View Full Document
E7 L2 4 Matlab basics The Desktop menu undocking and tiling windows command command history workspace current directory The Help menu
E7 L2 5 Matlab as a calculator Matlab as a calculator Type expressions at the >>, and press return Result is computed, and displayed as ans Use numbers, +, *, /, -, (), sin, cos, exp, abs, round,… NOTE: In the next slides I will show examples of the use of matlab in powerpoint. The powerpoint output format is not exactly equal to the actual matlab output.

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

View Full Document
E7 L2 6 Entering Commands and Expressions Entering Commands and Expressions MATLAB retains your previous keystrokes. Use the up-arrow key to scroll back back through the commands. Use the down-arrow key to scroll forward. Edit a line using the left- and right-arrow keys the Backspace key, and the Delete key. Press the Enter key to execute the command.
E7 L2 7 Scalar Arithmetic Operations Scalar Arithmetic Operations Symbol Operation MATLAB form ^ exponentiation: a b a^b * multiplication: ab a*b / right division: a/b a/b \ left division: b/a a\b + addition: a + b a + b - subtraction: a - b a - b

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 28

Lecture_02_horowitz - 1 E7 INTRODUCTION TO COMPUTER E7...

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

View Full Document
Ask a homework question - tutors are online