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

log2 (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 = log2(a)

[f, e] = log2(a)

Description

c = log2(e) computes the base 2 logarithm of the input elements. The base 2 logarithm of zero is -inf. [f, e] = log2(a) splits the input elements into binary mantissa f and exponent e so that the absolute value of f is equal to or greater than 0.5 and less than 1, and e is an integer. If a = 0, f = e = 0.

Details

Examples

Inputs

Name Description
a Specifies a numeric scalar, vector, or matrix.

Outputs

Name Description
c Returns the base 2 logarithm of the elements in a. c returns complex numbers for negative or complex elements in a. c is a scalar, vector, or matrix of the same size as a.
f Returns the binary mantissa of the elements in a. f is a scalar, vector, or matrix of the same size as a.
e Returns the binary exponent of the elements in a. e is a scalar, vector, or matrix of the same size as a.

Details

For the following support characteristics table, only c = log2(a) is suitable for bounded execution times in Real-Time applications. [f, e] = log2(a) is not characterized.

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 = [0.1, 1; 10, 100]
C = log2(A)

Related Topics

log


 

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