home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / lib / octave / 1.1.1 / m / elfun / log2.m < prev    next >
Encoding:
Text File  |  1996-10-12  |  182 b   |  11 lines

  1. function w = log2 (z)
  2.   
  3. # log2 (z):  compute the logarithm base 2 for each element of z.
  4.   
  5.   if (nargin != 1)
  6.     usage ("log2 (z)");
  7.   endif
  8.  
  9.   w = log(z) / log(2);
  10.   
  11. endfunction