dot (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: vector

Requires: MathScript RT Module

Syntax

c = dot(a, b)

c = dot(a, b, dim)

Description

Computes the dot product of two vectors.

Examples

Inputs

Name Description
a Specifies a vector or matrix of double-precision, floating-point or complex double-precision, floating-point numbers.
b Specifies a vector or matrix of double-precision, floating-point or complex double-precision, floating-point numbers. b must be the same size as a.
dim Specifies the order in which LabVIEW computes the dot product for matrices. dim is a scalar that accepts the following values.

 1 Performs a column-wise calculation of the dot product. 2 Performs a row-wise calculation of the dot product.

Outputs

Name Description
c Returns the dot product of a and b. 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

A = [1, 2, 3]
B = [0, -3, 2]
C = dot(A, B)