Mercurial > hg > octave-lyh
changeset 13062:b3a8b75dfec3
codesprint: 9 tests for bartlett.m
author | Andriy Shinkarchuck <adriano32.gnu@gmail.com> |
---|---|
date | Sat, 03 Sep 2011 13:12:50 -0500 |
parents | addfc0ae69c0 |
children | 4b110dd204b9 |
files | scripts/signal/bartlett.m |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/signal/bartlett.m +++ b/scripts/signal/bartlett.m @@ -47,3 +47,17 @@ endif endfunction + +%!assert (bartlett (1), 1); +%!assert (bartlett (2), zeros (2,1)); +%!assert (bartlett (16), fliplr (bartlett (16))); +%!assert (bartlett (15), fliplr (bartlett (15))); +%!test +%! N = 9; +%! A = bartlett (N); +%! assert (A (ceil (N/2)), 1); + +%!error bartlett (); +%!error bartlett (0.5); +%!error bartlett (-1); +%!error bartlett (ones(1,4)); \ No newline at end of file