From: Ben B. <bar...@al...> - 2005-05-11 15:20:51
|
OK. I encountered this because optimset.m has the line 45: opt = setfields (); which caused the original setfields.m: function s = setfields(s,varargin) if rem(nargin,2) != 1, error('setfields: called with odd number of arguments\n') ; endif to complain. nargin==0 should be a valid call to setfields, so maybe some easy fix would be: function s = setfields(s,varargin) if nargin>0 if rem(nargin,2) != 1, error('setfields: called with even number of arguments\n') ; endif else s=struct; end Andy Adler wrote: >Note that this is just a documentation bug. The first >parameter is the struct, so the code is correct. > >Ben Barrowes wrote: > >Downloaded octave-forge-2004.11.16.tar.gz on May 6th. setfields.m in >main/struct of my build trunk has this bug. > >Ben > >Andy Adler wrote: > > > >>The current version does not have this message. >>What version of octave-forge do you have? >> >>Andy >> >> > > > -- -------------------- Benjamin E. Barrowes ------------------- Los Alamos National Laboratory bar...@al... Biophysics Group P-21, MS-D454 Phone:(505)606-0105 Los Alamos, NM 87544 FAX:(270)294-1268 ------------------------------------------------------------- |