Mercurial > hg > octave-terminal
changeset 13068:542891ebfcdb
codesprint: 9 tests for bartlett.m
author | Andriy Shinkarchuck <adriano32.gnu@gmail.com> |
---|---|
date | Sat, 03 Sep 2011 14:09:51 -0500 |
parents | 875577a19d70 |
children | 48c94e21b57f |
files | scripts/signal/blackman.m |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/signal/blackman.m +++ b/scripts/signal/blackman.m @@ -46,3 +46,18 @@ endif endfunction + +%!assert (blackman (1), 1); +%!assert (blackman (2), zeros(2,1), 1e-6); +%!assert (blackman (16), fliplr (blackman (16))); +%!assert (blackman (15), fliplr (blackman (15))); +%!test +%! N = 9; +%! A = blackman (N); +%! assert (A (ceil (N/2)), 1, 1e-6); +%! assert ([A(1), A(length (A))], zeros (1, 2), 1e-6); + +%!error blackman (); +%!error blackman (0.5); +%!error blackman (-1); +%!error blackman (ones(1,4));