This preview shows page 1. Sign up to view the full content.
Unformatted text preview: elements in a vector. The cumulative product of the j th element of the vector x, x j , is defined by p j = (x 1 )(x 2 ) . .. (x j ) for j = 1:length of the vector x. Now write a program that uses two for-loops to explicitly carry out the calculations, element by element. An "inner" loop should accumulate the product and an "outer" loop should more through the elements of the vector p....
View Full Document
This note was uploaded on 09/20/2011 for the course PETE 2060 taught by Professor Staff during the Fall '08 term at LSU.
- Fall '08