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 forloops 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
 Fall '08
 Staff
 pj, Petroleum Engineering Homework, randomnumber generator rand

Click to edit the document details