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

dot (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

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.

Examples

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

Related Topics

cross


 

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