Mercurial > hg > octave-lyh
comparison scripts/strings/dec2bin.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | fa78cb8d8a5c |
comparison
equal
deleted
inserted
replaced
7410:8a3b2ccc4e11 | 7411:83a8781b529d |
---|---|
47 else | 47 else |
48 print_usage (); | 48 print_usage (); |
49 endif | 49 endif |
50 | 50 |
51 endfunction | 51 endfunction |
52 | |
53 %!assert(strcmp (dec2bin (14), "1110")); | |
54 | |
55 %!error dec2bin (); | |
56 | |
57 %!assert(strcmp (dec2bin (14, 6), "001110")); | |
58 | |
59 %!error dec2bin (1, 2, 3); | |
60 |