Mercurial > hg > octave-nkf
diff scripts/signal/autoreg_matrix.m @ 12831:05a6e27d7908
codesprint: Wrote 4 tests for autoreg_matrix.m
author | Andriy Shinkarchuck <adriano32.gnu@gmail.com> |
---|---|
date | Sat, 16 Jul 2011 16:21:03 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/signal/autoreg_matrix.m +++ b/scripts/signal/autoreg_matrix.m @@ -47,3 +47,16 @@ endfor endfunction + + +%!test +%! K=4; +%! A = zeros(1,K+1); +%! A(1) = 1; +%! B = eye(K+1); +%! B(:,1) = 1; +%! assert (autoreg_matrix(A,K),B); + +%!error autoreg_matrix() +%!error autoreg_matrix(1) +%!error autoreg_matrix(ones(4,1),5)