Hi,

I think I see a bug in the parcellfun.m function of the general-1.2.0
package.

The following output produces an error with general-1.2.0 while it was
fine with general-1.1.4
==========================================================
octave:8> x{1}=pi/2;
octave:9> x{2}=pi;
octave:10> parcellfun(2,'sin',x)
error: common_size: only makes sense if nargin >= 2
error: called from:
error:   /usr/share/octave/3.2.4/m/general/common_size.m at line 49, column 5
error:   /home/evmik/octave/general-1.2.0/parcellfun.m at line 97, column 21
==========================================================

However if after installation of general-1.2.0 I replace parcellfun.m
from general-1.1.4 everything works as expected.

The only relevant differences of the parcellfun.m are shown below
(truncated output of: diff -u parcellfun.m.1.1.4 parcellfun.m.1.2.0)
==========================================================
   if (length (args) == 0)
     print_usage ();
-  elseif (length (args) > 1 && ! size_equal (args{:}))
-    error ("arguments size must match");
+  else
+    [err, args{:}] = common_size (args{:});
+    if (err)
+      error ("parcellfun: arguments size must match");
+    endif
   endif
==========================================================

I am a bit confused about 'common_size' usage. Why is it needed at all?


-- 
Eugeniy

------------------------------------------------------------------------------

_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to