Mercurial > forge
changeset 10713:592f5a4d78f0 octave-forge
xcorr2: add simple test
author | carandraug |
---|---|
date | Thu, 23 Aug 2012 17:54:14 +0000 |
parents | 20f93f0b1068 |
children | 59484a00afa2 |
files | main/signal/inst/xcorr2.m |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main/signal/inst/xcorr2.m Thu Aug 23 17:15:22 2012 +0000 +++ b/main/signal/inst/xcorr2.m Thu Aug 23 17:54:14 2012 +0000 @@ -88,3 +88,15 @@ error ("invalid type of scale %s", biasflag); endswitch endfunction + +%!test +%! a = magic (5); +%! b = [6 13 22; 10 18 23; 8 15 23]; +%! c = [391 807 519 391 473 289 120 +%! 920 1318 1045 909 1133 702 278 +%! 995 1476 1338 1534 2040 1161 426 +%! 828 1045 1501 2047 2108 1101 340 +%! 571 1219 2074 2155 1896 821 234 +%! 473 1006 1643 1457 946 347 108 +%! 242 539 850 477 374 129 54]; +%! assert (xcorr2 (a, b), c);