The cumulative product of the vector X is defined by:
P=(X1)(X2)...(XJ)
for J=1:length of the vector x.
Any ideas? (for MATLAB)
Using nested "for" loops, write a script that computes the cumulative product of the elements in a vector.
p= 1;
for i=1:length(X)
p = p * X(i);
end
Good luck!
reliable web hosting
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment