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

nextpow2 (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the basic class.

Syntax

c = nextpow2(a)

Description

Computes the first power of 2 that is not smaller than abs(a). More precisely, p = nextpow2(a) if 2^p>=abs(a) and p is minimal.

Examples

Inputs

Name Description
a Specifies a scalar or vector. If a is a vector, nextpow2(a) is equivalent to nextpow2(length(a)).

Outputs

Name Description
c Returns the first power of 2 that is not smaller than abs(a). c is a scalar.

Examples

A = 7.3
C = nextpow2(A)

Related Topics

log2
pow2


Resources


 

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