From: <be...@us...> - 2012-08-09 16:45:39
|
Revision: 10850 http://octave.svn.sourceforge.net/octave/?rev=10850&view=rev Author: benjf5 Date: 2012-08-09 16:45:30 +0000 (Thu, 09 Aug 2012) Log Message: ----------- Really the last commit for lssa release 0.1.1. Modified Paths: -------------- trunk/octave-forge/extra/lssa/inst/cubicwgt.m trunk/octave-forge/extra/lssa/inst/lscomplex.m trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m trunk/octave-forge/extra/lssa/inst/lsreal.m Modified: trunk/octave-forge/extra/lssa/inst/cubicwgt.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/cubicwgt.m 2012-08-09 16:08:18 UTC (rev 10849) +++ trunk/octave-forge/extra/lssa/inst/cubicwgt.m 2012-08-09 16:45:30 UTC (rev 10850) @@ -34,7 +34,6 @@ %! k = [ 0 , 3 , 1.5, -1, -0.5, -0.25, 0.75 ]; %!assert( cubicwgt(h), 0 ); %!assert( cubicwgt(m), 1 + m ^ 2 * ( 2 * m - 3 )); -%!assert( cubicwgt(k), [ 1.00000, 0.00000, 0.00000, 0.00000, 0.50000, -%! 0.84375, 0.15625], 1e-6); +%!assert( cubicwgt(k), [ 1.00000, 0.00000, 0.00000, 0.00000, 0.50000, 0.84375, 0.15625], 1e-6); %! ## Tests cubicwgt on two scalars and two vectors; cubicwgt will work %! ## on any array input. \ No newline at end of file Modified: trunk/octave-forge/extra/lssa/inst/lscomplex.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscomplex.m 2012-08-09 16:08:18 UTC (rev 10849) +++ trunk/octave-forge/extra/lssa/inst/lscomplex.m 2012-08-09 16:45:30 UTC (rev 10850) @@ -48,7 +48,4 @@ %! cos ((1/4)*maxfreq.*t)); %! o = [ maxfreq , 3 / 4 * maxfreq , 1 / 4 * maxfreq ]; %!assert( lscomplex(t,x,maxfreq,2,2), -%! [-0.400924546169395 - 2.371555305867469i, -%! 1.218065147708429 - 2.256125004156890i, -%! 1.935428592212907 - 1.539488163739336i, -%! 2.136692292751917 - 0.980532175174563i ], 5e-10 ); \ No newline at end of file +%! [-0.400924546169395 - 2.371555305867469i, 1.218065147708429 - 2.256125004156890i, 1.935428592212907 - 1.539488163739336i, 2.136692292751917 - 0.980532175174563i ], 5e-10 ); \ No newline at end of file Modified: trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m 2012-08-09 16:08:18 UTC (rev 10849) +++ trunk/octave-forge/extra/lssa/inst/lscomplexwavelet.m 2012-08-09 16:45:30 UTC (rev 10850) @@ -15,7 +15,7 @@ -function transform = lscomplexwavelet( t , x, omegamax, ncoeff, noctave, tmin, tmax, tstep, sigma = 0.05) +function transform = lscomplexwavelet( T, X, omegamax, ncoeff, noctave, tmin, tmax, tstep, sigma = 0.05) ## This is a transform based entirely on the simplified complex-valued transform ## in the Mathias paper, page 10. My problem with the code as it stands is, it @@ -42,8 +42,8 @@ current_iteration = (octave_iter-1)*ncoeff+coeff_iter; window_radius = pi / ( sigma * omegamax * ( 2 ^ ( current_iteration - 1 ) ) ); - window_count = 2 * ceil ( ( tmax - tmin ) / window_step ) - 1; - omega = current_frequency = maxfreq * 2 ^ ( - octave_iter*coeff_iter / ncoeff ); + window_count = 2 * ceil ( ( tmax - tmin ) / window_radius ) - 1; + omega = current_frequency = omegamax * 2 ^ ( - octave_iter*coeff_iter / ncoeff ); Modified: trunk/octave-forge/extra/lssa/inst/lsreal.m =================================================================== --- trunk/octave-forge/extra/lssa/inst/lsreal.m 2012-08-09 16:08:18 UTC (rev 10849) +++ trunk/octave-forge/extra/lssa/inst/lsreal.m 2012-08-09 16:45:30 UTC (rev 10850) @@ -70,10 +70,7 @@ %! 0.2 .* cos ( maxfreq .* t ) + %! cos ( (1/4) * maxfreq .* t ) ); %!assert (lsreal (t,x,maxfreq,2,2), -%! [-1.68275915310663 + 4.70126183846743i, -%! 1.93821553170889 + 4.95660209883437i, -%! 4.38145452686697 + 2.14403733658600i, -%! 5.27425332281147 - 0.73933440226597i ], +%! [-1.68275915310663 + 4.70126183846743i, 1.93821553170889 + 4.95660209883437i, 4.38145452686697 + 2.14403733658600i, 5.27425332281147 - 0.73933440226597i ], %! 5e-10) %! # In the assert here, I've got an error bound large enough to catch %! # individual system errors which would present no real issue. \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |