changeset 11558:4cbd2e06b5cd octave-forge

signal: fix order of arguments in help text * cpsd.m, mscohere.m, tfestimate.m: Fix order of arguments in help text.
author mtmiller
date Sun, 17 Mar 2013 22:51:04 +0000
parents c2c46401c207
children 35a59ed61854
files main/signal/NEWS main/signal/inst/cpsd.m main/signal/inst/mscohere.m main/signal/inst/tfestimate.m
diffstat 4 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/main/signal/NEWS	Sun Mar 17 22:38:42 2013 +0000
+++ b/main/signal/NEWS	Sun Mar 17 22:51:04 2013 +0000
@@ -27,12 +27,16 @@
     window for a length argument of 1, and making all arguments after the
     length optional.
 
- ** Documented the optional gain argument for the following functions:
+ ** Minor updates to documentation for the following functions:
 
+      cpsd
+      mscohere
       sos2tf
       sos2zp
+      tfestimate
       zp2sos
 
+
  ** signal is no longer dependent on the optim package.
 
 ===============================================================================
--- a/main/signal/inst/cpsd.m	Sun Mar 17 22:38:42 2013 +0000
+++ b/main/signal/inst/cpsd.m	Sun Mar 17 22:51:04 2013 +0000
@@ -14,7 +14,7 @@
 %% this program; if not, see <http://www.gnu.org/licenses/>.
 
 %% Usage:
-%%   [Pxx,freq] = cpsd(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
+%%   [Pxx,freq] = cpsd(x,y,window,overlap,Nfft,Fs,range)
 %%
 %%     Estimate cross power spectrum of data "x" and "y" by the Welch (1967)
 %%     periodogram/FFT method.
@@ -23,8 +23,8 @@
 function [varargout] = cpsd(varargin)
 
   %% Check fixed argument
-  if ( nargin<2 )
-    error( 'cpsd: Need at least 2 args. Use help cpsd.' );
+  if (nargin < 2 || nargin > 7)
+    print_usage ();
   end
   nvarargin = length(varargin);
   %% remove any pwelch RESULT args and add 'cross'
--- a/main/signal/inst/mscohere.m	Sun Mar 17 22:38:42 2013 +0000
+++ b/main/signal/inst/mscohere.m	Sun Mar 17 22:51:04 2013 +0000
@@ -14,7 +14,7 @@
 %% this program; if not, see <http://www.gnu.org/licenses/>.
 
 %% Usage:
-%%   [Pxx,freq]=mscohere(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
+%%   [Pxx,freq]=mscohere(x,y,window,overlap,Nfft,Fs,range)
 %%
 %%     Estimate (mean square) coherence of signals "x" and "y".
 %%     Use the Welch (1967) periodogram/FFT method.
@@ -24,8 +24,8 @@
 function [varargout] = mscohere(varargin)
   %%
   %% Check fixed argument
-  if ( nargin<2 )
-    error( 'mscohere: Need at least 2 args. Use help mscohere' );
+  if (nargin < 2 || nargin > 7)
+    print_usage ();
   end
   nvarargin = length(varargin);
   %% remove any pwelch RESULT args and add 'cross'
--- a/main/signal/inst/tfestimate.m	Sun Mar 17 22:38:42 2013 +0000
+++ b/main/signal/inst/tfestimate.m	Sun Mar 17 22:51:04 2013 +0000
@@ -14,7 +14,7 @@
 %% this program; if not, see <http://www.gnu.org/licenses/>.
 
 %% Usage:
-%%   [Pxx,freq]=tfestimate(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
+%%   [Pxx,freq]=tfestimate(x,y,window,overlap,Nfft,Fs,range)
 %%
 %%     Estimate transfer function of system with input "x" and output "y".
 %%     Use the Welch (1967) periodogram/FFT method.
@@ -23,8 +23,8 @@
 function [varargout] = tfestimate(varargin)
   %%
   %% Check fixed argument
-  if ( nargin<2 )
-    error( 'tfestimate: Need at least 2 args. Use help tfestimate' );
+  if (nargin < 2 || nargin > 7)
+    print_usage ();
   end
   nvarargin = length(varargin);
   %% remove any pwelch RESULT args and add 'cross'