From: <cd...@us...> - 2012-08-07 06:03:51
|
Revision: 10833 http://octave.svn.sourceforge.net/octave/?rev=10833&view=rev Author: cdf Date: 2012-08-07 06:03:45 +0000 (Tue, 07 Aug 2012) Log Message: ----------- beautify test syntax Modified Paths: -------------- trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m Modified: trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m 2012-08-07 05:55:09 UTC (rev 10832) +++ trunk/octave-forge/extra/lssa/inst/lombnormcoeff.m 2012-08-07 06:03:45 UTC (rev 10833) @@ -31,10 +31,14 @@ endfunction %!shared t, x, o, maxfreq -%! t = linspace(0,8); -%! maxfreq = 4 / ( 2 * pi ); -%! o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; -%! x = ( 2.*sin(maxfreq.*t) + 3.*sin((3/4)*maxfreq.*t) - 0.5 .* sin((1/4)*maxfreq.*t) - 0.2 .* cos(maxfreq .* t) + cos((1/4)*maxfreq.*t)); -%!assert( lombnormcoeff(t,x,o(1)),63.3294946603949,5e-10 ); -%!assert( lombnormcoeff(t,x,o(2)),73.2601360674868,5e-10 ); -%!assert( lombnormcoeff(t,x,o(3)),53.0799752083903,5e-10 ); +%! maxfreq = 4 / (2 * pi); +%! t = linspace (0, 8); +%! x = (2 .* sin (maxfreq .* t) + +%! 3 .* sin ((3/4) * maxfreq .* t) - +%! 0.5 .* sin((1/4) * maxfreq .* t) - +%! 0.2 .* cos (maxfreq .* t) + +%! cos ((1/4) * maxfreq .*t)); +%! o = [maxfreq , (3/4 * maxfreq) , (1/4 * maxfreq)]; +%!assert (lombnormcoeff (t,x,o(1)), 63.3294946603949, 5e-10); +%!assert (lombnormcoeff (t,x,o(2)), 73.2601360674868, 5e-10); +%!assert (lombnormcoeff (t,x,o(3)), 53.0799752083903, 5e-10); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |