# HG changeset patch # User Jaroslav Hajek # Date 1257753568 -3600 # Node ID e3e5d43d9d4cd691927e1d84024c716ba89c4005 # Parent cc5bb7b5679fe3fd83cfe93c7fd27d8c55390a03 fix arrayfun with nargout=0 diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-11-09 Jaroslav Hajek + + * general/arrayfun.m: Fix nargout=0 case. + 2009-11-08 Petr Mikulik * plot/gnuplot_drawnow.m: Support gnuplot's dumb terminal. diff --git a/scripts/general/arrayfun.m b/scripts/general/arrayfun.m --- a/scripts/general/arrayfun.m +++ b/scripts/general/arrayfun.m @@ -156,7 +156,7 @@ args = cellfun (@num2cell, args, "UniformOutput", false, "ErrorHandler", @arg_class_error); - [varargout{1:nargout}] = cellfun (func, args{:}, opts{:}); + [varargout{1:max(1, nargout)}] = cellfun (func, args{:}, opts{:}); endfunction