LECTURE_3_CS113_2010 - i (or) j imaginary number realmin,...

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

View Full Document Right Arrow Icon
15 Rules About Variables
Background image of page 1

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

View Full DocumentRight Arrow Icon
16 Rules About Variables
Background image of page 2
17 Predefined Variables
Background image of page 3

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

View Full DocumentRight Arrow Icon
18 Some Useful Commands
Background image of page 4
19 The ‘;’ and ‘%’ operators
Background image of page 5

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

View Full DocumentRight Arrow Icon
20 Big deal, a calculator’s $20 Matlab is a fully-functional programming language This means we get variables name = value • Name can be anything made of letters, numbers, and a few symbols (_). Must start with a letter End line with “;” to avoid output • Can also use “;” to put multiple commands on a line List with who Delete with clear More info with whos
Background image of page 6
21 Reserved Words… Matlab has some special (reserved) words that you may not use… for end if while function return elsif case otherwise switch continue else try catch global persistent break
Background image of page 7

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

View Full DocumentRight Arrow Icon
22 Matlab has Some Special Variables Special Variable Description ans default variable name for results beep make sound pi mathematical constant eps smallest number that can be subtracted from 0 to make a negative inf infinity NaN not a number
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

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

View Full DocumentRight Arrow Icon
Background image of page 14
Background image of page 15

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

View Full DocumentRight Arrow Icon
Background image of page 16
Background image of page 17

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

View Full DocumentRight Arrow Icon
Background image of page 18
Background image of page 19

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

View Full DocumentRight Arrow Icon
Background image of page 20
Background image of page 21

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

View Full DocumentRight Arrow Icon
Background image of page 22
Background image of page 23

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

View Full DocumentRight Arrow Icon
Background image of page 24
Background image of page 25

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

View Full DocumentRight Arrow Icon
Background image of page 26
Background image of page 27

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

View Full DocumentRight Arrow Icon
Background image of page 28
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i (or) j imaginary number realmin, realmax smallest & largest positive real numbers bitmax largest positive integer nargin, nargout number of function in (or) out variables varargin variable number of function in args varaout variable number of function out args 23 Arrays: Vectors and Matrices 24 Arrays of numbers are used in many applications 25 Entering Vectors 26 Entering Vectors 27 Entering Vectors 28 Entering Vectors 29 Entering Vectors 30 Entering Vectors using linspace() command 31 Two Dimensional Arrays: Matrices 32 Creating a Matrix in Matlab 33 The Transpose Operation 34 The Transpose Operation 35 Array Addressing (vectors) 36 Array Addressing (matrices) 37 Using the colon (:) in addressing vectors 38 Using the colon (:) in addressing matrices 39 Using the colon (:) in addressing matrices Examples 40 Using the colon (:) in addressing matrices Examples 41 Some Useful Notes about Variables 42 Array Examples...
View Full Document

Page1 / 28

LECTURE_3_CS113_2010 - i (or) j imaginary number realmin,...

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

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