diff scripts/strings/base2dec.m @ 8442:502e58a0d44f

Fix docstrings, add examples, references and tests to string functions
author Thorsten Meyer <thorsten.meyier@gmx.de>
date Mon, 05 Jan 2009 08:11:03 +0100
parents a1dbe9d80eee
children e07e93c04080
line wrap: on
line diff
--- a/scripts/strings/base2dec.m	Tue Dec 30 00:25:20 2008 -0500
+++ b/scripts/strings/base2dec.m	Mon Jan 05 08:11:03 2009 +0100
@@ -81,3 +81,9 @@
   out = d * (base .^ (columns(d)-1 : -1 : 0)');
 
 endfunction
+
+%!error <Invalid call to base2dec.*> base2dec();
+%!error <Invalid call to base2dec.*> base2dec("11120");
+%!error <Invalid call to base2dec.*> base2dec("11120", 3, 4);
+%!assert(base2dec ("11120", 3), 123);
+%!assert(base2dec ("yyyzx", "xyz"), 123);
\ No newline at end of file