Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

prod (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: basic

Requires: MathScript RT Module

Syntax

c = prod(a)

c = prod(a, b)

Description

Computes the product of vectors and matrices.

Examples

Inputs

Name Description
a Specifies a vector or matrix of double-precision, floating-point or complex double-precision, floating-point numbers.
b Specifies the dimension along which to compute the product. b accepts the following values.

1 (default) LabVIEW computes the product of each column of a.
2 LabVIEW computes the product of each row of a.

Outputs

Name Description
c Returns the product of a. If a is a vector, c returns the product of all elements in a. If a is a matrix, c returns the column-wise products of the elements in a. c is a scalar or vector.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Yes

Examples

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

A = [1, 2, 3, 4; 5, 6, 7, 8; 9, 10, 11, 12]
prod(A, 1)
prod(A, 2)

Related Topics

accumproducts
accumsums
sum


 

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