When we use cellfun without return argument we have a result, but with
parcellfun we don't have any result because nargout==0 :

> octave:1> f = @(x) x^2;
> octave:2> X = num2cell (1:10);
> octave:3> cellfun(f,X)
> ans =
> 
>      1     4     9    16    25    36    49    64    81   100
> 
> octave:4> parcellfun(5,f,X)
> parcellfun: 10/10 jobs done
> octave:5> 

So I propose a patch.

-- 
J.Benoist Leger
--- /usr/share/octave/packages/general-1.2.1/parcellfun.m   2010-07-07 12:04:59.000000000 +0200
+++ parcellfun.m    2010-07-07 13:44:34.061876880 +0200
@@ -58,6 +58,11 @@
     print_usage ();
   endif
 
+  # In the case of an execution without result
+  if (nargout==0)
+    nargout = 1;
+  endif
+
   if (ischar (fun))
     fun = str2func (fun);
   elseif (! isa (fun, "function_handle"))

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to