14-440-127 Recitation 6 Presentation

14-440-127 - 14:440:127 Introduction to Computers for Engineers Recitation 6 Lecturer Blase E Ur Recitation Instructor Tianming Li Recitation

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

View Full Document Right Arrow Icon
14:440:127 Introduction to Computers for Engineers Recitation 6 Lecturer: Blase E. Ur Recitation Instructor: Tianming Li Recitation Instructor: Ke Xu Recitation Instructor: Brian Viezbicke Recitation Instructor: Mingliang Wang
Background image of page 1

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

View Full DocumentRight Arrow Icon
Rutgers University SOE 14:440:127 Recitation 6 For Loop for VARIABLE = VECTOR STATEMENTS end i.e. for i = 1 : 100 disp(i) end First time through the loop, i=1 Then, go back to the top; i=2 The last time through the loop, i=100
Background image of page 2
Rutgers University SOE 14:440:127 Recitation 6 Sum 1 to 100 with a for loop s = 0; z s for z = 1:100 0 pre-loop s = s+z; 1 1 after the first time end 2 3 second time disp(s) 3 6 third time 4 10 fourth 5 15 fifth 6 21 sixth …. 100 5050 hundredth
Background image of page 3

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

View Full DocumentRight Arrow Icon
Rutgers University SOE 14:440:127 Recitation 6 Find the max (and location) in a vector maxvalue = -inf; location = -1; for x = 1:length(V) if(V(x)>maxvalue) maxvalue = V(x); location = x; end end disp(maxvalue) disp(location)
Background image of page 4
Rutgers University SOE 14:440:127 Recitation 6 Find all locations of max in a vector
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 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

Page1 / 12

14-440-127 - 14:440:127 Introduction to Computers for Engineers Recitation 6 Lecturer Blase E Ur Recitation Instructor Tianming Li Recitation

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