changeset 12522:9cae08c8df1f octave-forge

NaN/zscore: check for valid OPT argument
author schloegl
date Fri, 12 Sep 2014 20:02:20 +0000
parents 789f7651389a
children 78e73ee34c88
files extra/NaN/inst/zscore.m
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/extra/NaN/inst/zscore.m	Fri Sep 12 17:51:52 2014 +0000
+++ b/extra/NaN/inst/zscore.m	Fri Sep 12 20:02:20 2014 +0000
@@ -23,7 +23,7 @@
 
 %    This program is free software; you can redistribute it and/or modify
 %    it under the terms of the GNU General Public License as published by
-%    the Free Software Foundation; either version 2 of the License, or
+%    the Free Software Foundation; either version 3 of the License, or
 %    (at your option) any later version.
 %
 %    This program is distributed in the hope that it will be useful,
@@ -36,7 +36,7 @@
 
 
 %	$Id$
-%	Copyright (C) 2000-2003,2009 by Alois Schloegl <alois.schloegl@gmail.com>	
+%	Copyright (C) 2000-2003,2009,2014 by Alois Schloegl <alois.schloegl@ist.ac.at>	
 %       This function is part of the NaN-toolbox
 %       http://pub.ist.ac.at/~schloegl/matlab/NaN/
 
@@ -52,6 +52,9 @@
 if nargin<4
         W = []; 
 end
+if ~isempty(OPT) && ~any(OPT==[0,1])
+	error('OPT must be 0, 1 or empty.')
+end
 if isempty(DIM), 
         DIM=min(find(size(i)>1));
         if isempty(DIM), DIM=1; end;