Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

cumprod (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the basic class.

Syntax

c = cumprod(a)

c = cumprod(a, b)

Description

Computes the cumulative products of vectors and matrices.

Examples

Inputs

Name Description
a Specifies a vector or matrix.
b Specifies whether to compute the column-wise or row-wise cumulative products when a is a matrix. b is an integer that accepts the following values.

1 Computes the column-wise cumulative products of a.
2 Computes the row-wise cumulative products of a.

Outputs

Name Description
c Returns the cumulative products of a. c is a vector or matrix of the same size as a. If a is a vector, c returns a vector of the cumulative products of a. If a is a matrix and you do not specify b, c returns a matrix whose elements are the column-wise cumulative products of a.

Examples

A = [1:1:15]
C = cumprod(A)

Related Topics

cumsum
prod
sum


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit