comparison scripts/strings/dec2bin.m @ 3361:4f40efa995c1

[project @ 1999-11-19 21:19:37 by jwe]
author jwe
date Fri, 19 Nov 1999 21:19:44 +0000
parents c9f70d39255f
children f8dde1807dee
comparison
equal deleted inserted replaced
3360:48bd8127e19b 3361:4f40efa995c1
15 ## You should have received a copy of the GNU General Public License 15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, write to the Free 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA. 18 ## 02111-1307, USA.
19 19
20 ## usage: dec2bin (x) 20 ## -*- texinfo -*-
21 ## 21 ## @deftypefn {Function File} {} dec2bin (@var{n})
22 ## Returns the binary number corresponding to the nonnegative integer 22 ## Return a binary number corresponding the nonnegative decimal number
23 ## x. For example, dec2bin (14) returns "1110". 23 ## @var{n}, as a string of ones and zeros. For example,
24 ##
25 ## @example
26 ## dec2bin (14)
27 ## @result{} "1110"
28 ## @end example
29 ## @end deftypefn
24 30
25 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> 31 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
26 ## Adapted-By: jwe 32 ## Adapted-By: jwe
27 33
28 function y = dec2bin (x) 34 function y = dec2bin (x)