Mercurial > octave
diff libinterp/corefcn/ellipj.cc @ 16585:1a3bfb14b5da
Add and fix tests for ellipj, ellipke, and expint
* ellipj.cc: Fix demo, add validation tests.
* ellipke.m: Fix assert arguments, add tests.
* expint.m: Add tests.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 28 Apr 2013 17:08:11 -0400 |
parents | 2f766ceeb03e |
children | f423873d3275 |
line wrap: on
line diff
--- a/libinterp/corefcn/ellipj.cc Wed Apr 24 23:22:50 2013 -0400 +++ b/libinterp/corefcn/ellipj.cc Sun Apr 28 17:08:11 2013 -0400 @@ -406,13 +406,14 @@ %! [sn, cn, dn] = ellipj(U,M); %! %! %% Plotting -%! figure(2) %! c = colormap(hot(64)); %! data = {sn,cn,dn}; %! dname = {"sn","cn","dn"}; %! for i=1:3 %! subplot(1,3,i); -%! image(m,u,32*clip(data{i},[-1,1])+32); # clip function belongs to audio package +%! data{i}(data{i} > 1) = 1; +%! data{i}(data{i} < -1) = -1; +%! image(m,u,32*data{i}+32); %! title(dname{i}); %! end %! colormap(c); @@ -911,4 +912,8 @@ %! assert(sn,S,8*eps); %! assert(cn,C,8*eps); %! assert(dn,D,8*eps); + +%!error ellipj () +%!error ellipj (1) +%!error ellipj (1,2,3,4) */