complex (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: support

Requires: MathScript RT Module

Syntax

c = complex(a)

c = complex(a, b)

Description

Constructs a complex matrix.

Examples

Inputs

Name Description
a Specifies the real parts of the complex elements. a is a real scalar or a real matrix. If a is a scalar, LabVIEW converts a into a real matrix of the same size as b by repeating the scalar.
b Specifies the imaginary parts of the complex elements. b is a real scalar or a real matrix of the same size as a. If b is a scalar, LabVIEW converts b into a real matrix of the same size as a by repeating the scalar.

Outputs

Name Description
c Returns a complex matrix. c = complex(a) returns the elements of a as complex numbers.

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, 2, 3, 4];
B = [0, -2, -3, 9];
C = complex(A, B)

X = 1;
Y = [1, 2, 3, 4];
Z = complex(X, Y)