comparison scripts/general/nextpow2.m @ 9141:c1fff751b5a8

Update section 17.1 (Utility Functions) of arith.txi Split section into "Exponents and Logarithms" and "Utility Functions" Use Tex in many more of the doc strings for pretty printing in pdf format.
author Rik <rdrider0-list@yahoo.com>
date Mon, 20 Apr 2009 17:16:09 -0700
parents eb63fbe60fab
children 1231b1762a9a
comparison
equal deleted inserted replaced
9140:c309e028185e 9141:c1fff751b5a8
17 ## along with Octave; see the file COPYING. If not, see 17 ## along with Octave; see the file COPYING. If not, see
18 ## <http://www.gnu.org/licenses/>. 18 ## <http://www.gnu.org/licenses/>.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} nextpow2 (@var{x}) 21 ## @deftypefn {Function File} {} nextpow2 (@var{x})
22 ## If @var{x} is a scalar, returns the first integer @var{n} such that 22 ## If @var{x} is a scalar, return the first integer @var{n} such that
23 ## @iftex 23 ## @iftex
24 ## @tex 24 ## @tex
25 ## $2^n \ge |x|$. 25 ## $2^n \ge |x|$.
26 ## @end tex 26 ## @end tex
27 ## @end iftex 27 ## @end iftex
28 ## @ifnottex 28 ## @ifnottex
29 ## 2^n >= abs (x). 29 ## 2^n >= abs (x).
30 ## @end ifnottex 30 ## @end ifnottex
31 ## 31 ##
32 ## If @var{x} is a vector, return @code{nextpow2 (length (@var{x}))}. 32 ## If @var{x} is a vector, return @code{nextpow2 (length (@var{x}))}.
33 ## @seealso{pow2} 33 ## @seealso{pow2, log2}
34 ## @end deftypefn 34 ## @end deftypefn
35 35
36 ## Author: KH <Kurt.Hornik@wu-wien.ac.at> 36 ## Author: KH <Kurt.Hornik@wu-wien.ac.at>
37 ## Created: 7 October 1994 37 ## Created: 7 October 1994
38 ## Adapted-By: jwe 38 ## Adapted-By: jwe