Lecture3

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

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

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

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

View Full Document
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 =
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

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

View Full Document
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 =
Special predefined arrays: all zeros zeros(R,C) zeros(N) all ones ones(R,C) ones(N)

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.

## 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
Ask a homework question - tutors are online