Home > freetb4matlab > general > nextpow2.m

nextpow2

PURPOSE ^

% If @var{x} is a scalar, return the first integer @var{n} such that

SYNOPSIS ^

function n = nextpow2 (x)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} nextpow2 (@var{x})
% If @var{x} is a scalar, return the first integer @var{n} such that
% @tex
% $2^n \ge |x|$.
% @end tex
% @ifnottex
% 2^n >= abs (x).
% @end ifnottex
%
% If @var{x} is a vector, return @code{nextpow2 (length (@var{x}))}.
% @seealso{pow2, log2}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003