# HG changeset patch # User slackydeb # Date 1331778195 0 # Node ID 374d67bbed1f260de56f6bdee9f795781c4cdf73 # Parent 62801498fae3d9ae4ea3166868b4ab7e71c41154 ga: check nargout before nargin (style fix) diff -r 62801498fae3 -r 374d67bbed1f main/ga/inst/rastriginsfcn.m --- a/main/ga/inst/rastriginsfcn.m Thu Mar 15 02:23:03 2012 +0000 +++ b/main/ga/inst/rastriginsfcn.m Thu Mar 15 02:23:15 2012 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2008, 2009, 2010 Luca Favatella +## Copyright (C) 2008, 2009, 2010, 2012 Luca Favatella ## ## 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 @@ -22,8 +22,8 @@ ## Version: 2.0 function retval = rastriginsfcn (x) - if ((nargin != 1) || (nargout != 1) || - (columns (x) != 2)) + if ((nargout != 1) || + (nargin != 1) || (columns (x) != 2)) print_usage (); else x1 = x(:, 1);