{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter2-2g

# Chapter2-2g - MoreonChapter2 ReservedVariables...

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

More on Chapter 2

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

View Full Document
Reserved Variables ans -> the value of the  most recent calculation pi -> from geometry fame
More Reserved Variables inf -> infinity   example 1/0 NaN -> not a number example 0/0 i -> the square root of –1 j -> also the square root of –1

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

View Full Document
Examples of Using These Variables Try to calculate 1/0 What is 5 + 1/0? What is 5 + 0/0?
Plotting MATLAB has wonderful plotting  abilities. This section concentrates on simple 2-D  plots. First some explanation

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

View Full Document
Plotting II plot typically needs two input, both  vectors (1D arrays) of the same length. If x =(x 1 ,…,x n ) and y =(y 1 ,…,y n ) are such  vectors, plot(x,y) will plot the points     (x 1 ,y 1 ) , (x 2 ,y 2 ), (x 3 ,y 3 ) , … plot(y) will just plot the points (1, y 1 ),      (2, y 2 ),…
As an example, lets plot some points on  the line y=2x.    x=[1 2 3 4 5 6 7 8 9 10];

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 / 16

Chapter2-2g - MoreonChapter2 ReservedVariables...

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

View Full Document
Ask a homework question - tutors are online