Lecture3 - EGR 106 Lecture 3 Array Manipulations Brief...

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

View Full Document Right Arrow Icon
EGR 106 Lecture 3 Array Manipulations Brief Review of Last Week Additional Ideas: Special arrays Changing an array Some array operators Character arrays Textbook 2.4-2.10
Background image of page 1

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

View Full DocumentRight Arrow Icon
Review of Last Week Arrays are the fundamental data units in MATLAB Rectangular collection of data All variables are considered to be arrays Data values organized into rows and columns 4 5 3 9 1 0 4 6 6 2 0 1 8 - 3 2 0 y i e l d =
Background image of page 2
Size of an array (R x C) Construction: Brute force using brackets Concatenation of other arrays – L/R and U/D The colon operator Addressing: Individual elements Subarrays
Background image of page 3

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

View Full DocumentRight Arrow Icon
Some new tricks: end specifies the last row or column a colon ( : ) specifies all of a row or column yield(2,:) yield(end,1) use a single index for row and column vectors bob = [ 9 7 5 7 2 ] bob(4) 4 5 3 9 1 0 4 6 6 2 0 1 8 - 3 2 0 y i e l d =
Background image of page 4
Special predefined arrays: all zeros zeros(R,C) zeros(N) all ones ones(R,C) ones(N)
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 note was uploaded on 10/03/2011 for the course EGR 106 taught by Professor Taggart during the Spring '09 term at Rhode Island.

Page1 / 22

Lecture3 - EGR 106 Lecture 3 Array Manipulations Brief...

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