diff scripts/elfun/coth.m @ 7385:8b7b4f58199f

[project @ 2008-01-15 20:49:09 by jwe]
author jwe
date Tue, 15 Jan 2008 20:49:10 +0000
parents a1dbe9d80eee
children eb63fbe60fab
line wrap: on
line diff
--- a/scripts/elfun/coth.m
+++ b/scripts/elfun/coth.m
@@ -33,3 +33,13 @@
   w = 1 ./ tanh (z);
 
 endfunction
+
+%!test
+%! x = [pi/2*i, 3*pi/2*i];
+%! v = [0, 0];
+%! assert(all (abs (coth (x) - v) < sqrt (eps)));
+
+%!error coth ();
+
+%!error coth (1, 2);
+