view scripts/elfun/log2.m @ 904:3470f1e25a79

[project @ 1994-11-09 21:22:15 by jwe]
author jwe
date Wed, 09 Nov 1994 21:22:15 +0000
parents 632844972d35
children 5cffc4b8de57
line wrap: on
line source

function w = log2 (z)
  
# log2 (z):  compute the logarithm base 2 for each element of z.
  
  if (nargin != 1)
    usage ("log2 (z)");
  endif

  w = log(z) / log(2);
  
endfunction