changeset 19:26d057e0ed8f octave-forge

fix arg processing for 3 args
author pkienzle
date Tue, 30 Oct 2001 18:06:28 +0000
parents 17e1a5a6b6da
children 997ba9e81037
files main/signal/xcorr.m main/signal/xcov.m
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/main/signal/xcorr.m	Mon Oct 29 15:40:43 2001 +0000
+++ b/main/signal/xcorr.m	Tue Oct 30 18:06:28 2001 +0000
@@ -48,6 +48,8 @@
 ##     - fix test for real return value
 ## 2001-02-24 Paul Kienzle
 ##     - remove all but one loop
+## 2001-10-30 Paul Kienzle <pkienzle@users.sf.net>
+##     - fix arg parsing for 3 args
 
 function [R, lags] = xcorr (X, Y, maxlag, scale)
   
@@ -65,7 +67,7 @@
     endif
   elseif nargin==3
     scale=[];
-    if isstr(maxlag), scale=maxlag; scale=[]; endif
+    if isstr(maxlag), scale=maxlag; maxlag=[]; endif
     if is_scalar(Y), maxlag=Y; Y=[]; endif
   endif
 
--- a/main/signal/xcov.m	Mon Oct 29 15:40:43 2001 +0000
+++ b/main/signal/xcov.m	Tue Oct 30 18:06:28 2001 +0000
@@ -34,6 +34,9 @@
 ## Returns the covariance for each lag in the range, plus an 
 ## optional vector of lags.
 
+## 2001-10-30 Paul Kienzle <pkienzle@users.sf.net>
+##     - fix arg parsing for 3 args
+
 function [retval, lags] = xcov (X, Y, maxlag, scale)
 
   if (nargin < 1 || nargin > 4)
@@ -49,7 +52,7 @@
     endif
   elseif nargin==3
     scale=[];
-    if isstr(maxlag), scale=maxlag; scale=[]; endif
+    if isstr(maxlag), scale=maxlag; maxlag=[]; endif
     if is_scalar(Y), maxlag=Y; Y=[]; endif
   endif