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

max (MathScript RT Module Function)

LabVIEW 2011 MathScript RT Module Help

Edition Date: June 2011

Part Number: 373123B-01

»View Product Info

Owning Class: basic

Requires: MathScript RT Module

Syntax

c = max(a)

c = max(a, b)

c = max(a, [], e)

[c, d] = max(a)

Description

Determines the largest input element. If an element is complex, LabVIEW considers only its magnitude.

Examples

Inputs

Name Description
a Specifies a numeric scalar, vector, or matrix.
b Specifies a scalar, vector, or matrix of the same size as a.
e Specifies the dimension of a in which LabVIEW determines the largest input element. e is an integer.
[] Tells LabVIEW that you want to specify a and e but not b.

Outputs

Name Description
c Returns the largest element in a if a is a vector. If a is a matrix, c returns a row vector of the largest elements in each column of a or a column vector of the largest elements in each row of a, depending on the value of e. If you specify b, c returns the largest of the corresponding elements of a and b. c is a scalar or vector.
d Specifies the indexes in a of the largest elements. d 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 = rand(3, 3)
C = max(A)

Related Topics

mean
median
min


 

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