Table Of Contents

nextpowerof2

Version:
    Last Modified: January 9, 2017

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

    Syntax

    c = nextpowerof2(a)
    Legacy name: nextpow2

    Inputs

    a

    Scalar or array of any dimension of double-precision, floating-point or complex double-precision, floating-point numbers.

    Outputs

    c

    First power of 2 that is not smaller than abs(a). c is an array of the same size as a.

    A = 7.3;
    C = nextpowerof2(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics