Mercurial > octave-antonio
comparison scripts/strings/bin2dec.m @ 2355:c9f70d39255f
[project @ 1996-08-20 23:30:54 by jwe]
author | jwe |
---|---|
date | Tue, 20 Aug 1996 23:32:09 +0000 |
parents | b5568c31ee2c |
children | 5ee5afb3981a |
comparison
equal
deleted
inserted
replaced
2354:2ce6e1ec9b53 | 2355:c9f70d39255f |
---|---|
20 ## usage: bin2dec (x) | 20 ## usage: bin2dec (x) |
21 ## | 21 ## |
22 ## Returns the decimal number corresponding to the binary number in | 22 ## Returns the decimal number corresponding to the binary number in |
23 ## quotes. For example, bin2dec ("1110") returns 14. | 23 ## quotes. For example, bin2dec ("1110") returns 14. |
24 | 24 |
25 ## Author: jwe | 25 ## Author: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> |
26 ## Adapted-By: jwe | |
26 | 27 |
27 function y = bin2dec (x) | 28 function y = bin2dec (x) |
28 | |
29 ## Original version by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>. | |
30 | 29 |
31 if (nargin != 1) | 30 if (nargin != 1) |
32 usage ("bin2dec (x)"); | 31 usage ("bin2dec (x)"); |
33 endif | 32 endif |
34 | 33 |