From: <car...@us...> - 2012-08-15 12:07:18
|
Revision: 10876 http://octave.svn.sourceforge.net/octave/?rev=10876&view=rev Author: carandraug Date: 2012-08-15 12:07:12 +0000 (Wed, 15 Aug 2012) Log Message: ----------- fir2: replace calls to soon to be deprecated usage Modified Paths: -------------- trunk/octave-forge/main/signal/inst/fir2.m Modified: trunk/octave-forge/main/signal/inst/fir2.m =================================================================== --- trunk/octave-forge/main/signal/inst/fir2.m 2012-08-15 10:36:54 UTC (rev 10875) +++ trunk/octave-forge/main/signal/inst/fir2.m 2012-08-15 12:07:12 UTC (rev 10876) @@ -52,16 +52,13 @@ ## verify frequency and magnitude vectors are reasonable t = length(f); if t<2 || f(1)!=0 || f(t)!=1 || any(diff(f)<0) - usage("frequency must be nondecreasing starting from 0 and ending at 1"); - endif - if t != length(m) - usage("frequency and magnitude vectors must be the same length"); - endif - + error ("fir2: frequency must be nondecreasing starting from 0 and ending at 1"); + elseif t != length(m) + error ("fir2: frequency and magnitude vectors must be the same length"); ## find the grid spacing and ramp width - if (nargin>4 && length(grid_n)>1) || \ - (nargin>5 && (length(grid_n)>1 || length(ramp_n)>1)) - usage("grid_n and ramp_n must be integers"); + elseif (nargin>4 && length(grid_n)>1) || \ + (nargin>5 && (length(grid_n)>1 || length(ramp_n)>1)) + error ("fir2: grid_n and ramp_n must be integers"); endif if nargin < 4, grid_n=[]; endif if nargin < 5, ramp_n=[]; endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |