From: <lx...@us...> - 2010-04-07 21:32:09
|
Revision: 7164 http://octave.svn.sourceforge.net/octave/?rev=7164&view=rev Author: lxop Date: 2010-04-07 21:32:03 +0000 (Wed, 07 Apr 2010) Log Message: ----------- Fix for rho_filter to allow default arguments properly Modified Paths: -------------- trunk/octave-forge/main/image/inst/rho_filter.m Modified: trunk/octave-forge/main/image/inst/rho_filter.m =================================================================== --- trunk/octave-forge/main/image/inst/rho_filter.m 2010-04-07 16:45:21 UTC (rev 7163) +++ trunk/octave-forge/main/image/inst/rho_filter.m 2010-04-07 21:32:03 UTC (rev 7164) @@ -85,20 +85,19 @@ function [filtered_proj, filt] = rho_filter (proj, type, scaling) filtered_proj = proj; - - if (strcmpi (type, 'none')) - return; + + if (nargin < 3) + scaling = 1; endif - if (nargin < 2) || (size (type) == 0) type = 'ram-lak'; endif - - if (nargin < 3) - scaling = 1; + + if (strcmpi (type, 'none')) + return; endif - if (scaling > 1) + if (scaling > 1) || (scaling < 0) error ('Scaling factor must be in [0,1]'); endif @@ -171,5 +170,8 @@ %! figure, imshow (reconstruction, []) % $Log$ +% 2010-04-08 lxop +% Fixed default argument settings and checking. +% % 2010-03-19 lxop % Function completed to Matlab compatible level. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lx...@us...> - 2010-05-27 10:54:25
|
Revision: 7358 http://octave.svn.sourceforge.net/octave/?rev=7358&view=rev Author: lxop Date: 2010-05-27 10:54:18 +0000 (Thu, 27 May 2010) Log Message: ----------- Fixed rho_filter Modified Paths: -------------- trunk/octave-forge/main/image/inst/rho_filter.m Modified: trunk/octave-forge/main/image/inst/rho_filter.m =================================================================== --- trunk/octave-forge/main/image/inst/rho_filter.m 2010-05-27 08:51:36 UTC (rev 7357) +++ trunk/octave-forge/main/image/inst/rho_filter.m 2010-05-27 10:54:18 UTC (rev 7358) @@ -94,6 +94,7 @@ endif if (strcmpi (type, 'none')) + filt = 1; return; endif @@ -170,6 +171,11 @@ %! figure, imshow (reconstruction, []) % $Log$ +% 2010-05-27 lxop +% Function now returns a value in `filt' when `none' is specified +% as the filter type. Fixes the warning that was occuring with +% the demo. +% % 2010-04-08 lxop % Fixed default argument settings and checking. % This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-01-23 21:32:43
|
Revision: 9560 http://octave.svn.sourceforge.net/octave/?rev=9560&view=rev Author: carandraug Date: 2012-01-23 21:32:37 +0000 (Mon, 23 Jan 2012) Log Message: ----------- rho_filter: use hanning() from core instead of hann() from signal package Modified Paths: -------------- trunk/octave-forge/main/image/inst/rho_filter.m Modified: trunk/octave-forge/main/image/inst/rho_filter.m =================================================================== --- trunk/octave-forge/main/image/inst/rho_filter.m 2012-01-23 11:32:10 UTC (rev 9559) +++ trunk/octave-forge/main/image/inst/rho_filter.m 2012-01-23 21:32:37 UTC (rev 9560) @@ -124,7 +124,7 @@ elseif (strcmpi (type, 'hamming')) filt = fftshift (hamming (length (rho))); elseif (strcmpi (type, 'hann')) - filt = fftshift (hann (length (rho))); + filt = fftshift (hanning (length (rho))); elseif (strcmpi (type, 'cosine')) f = 0.5 * (0:length (rho) - 1)' / length (rho); filt = fftshift (sin (2 * pi * f)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |