From: <car...@us...> - 2012-08-23 17:54:21
|
Revision: 10899 http://octave.svn.sourceforge.net/octave/?rev=10899&view=rev Author: carandraug Date: 2012-08-23 17:54:14 +0000 (Thu, 23 Aug 2012) Log Message: ----------- xcorr2: add simple test Modified Paths: -------------- trunk/octave-forge/main/signal/inst/xcorr2.m Modified: trunk/octave-forge/main/signal/inst/xcorr2.m =================================================================== --- trunk/octave-forge/main/signal/inst/xcorr2.m 2012-08-23 17:15:22 UTC (rev 10898) +++ trunk/octave-forge/main/signal/inst/xcorr2.m 2012-08-23 17:54:14 UTC (rev 10899) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |