Possible bug in intersect
Thomas Weber
thomas.weber.mail at gmail.com
Sat Apr 11 10:38:51 CDT 2009
On Sat, Apr 11, 2009 at 02:11:25PM +0200, Jaroslav Hajek wrote:
> On Sat, Apr 11, 2009 at 12:26 PM, Massimiliano Culpo
> <misticoannoiato at yahoo.it> wrote:
> > Please find attached a possible bug occurring in octave-3.0.4.
> > The same behavior is very likely to be found also in octave-3.0.5.
> >
> > Massimiliano Culpo
> >
>
> I fixed this in the development sources.
Test for this bug attached.
Thomas
-------------- next part --------------
# HG changeset patch
# User Thomas Weber <thomas.weber.mail at gmail.com>
# Date 1239464264 -7200
# Node ID 68036841138c9ef0365ff0f188f3edfee8eb8460
# Parent 22ae6b3411a769d62f66f196473336440194404a
Add test for bugfix b2459d21a207
diff --git a/scripts/set/intersect.m b/scripts/set/intersect.m
--- a/scripts/set/intersect.m
+++ b/scripts/set/intersect.m
@@ -104,3 +104,8 @@
%! assert(ib,[3;1]);
%! assert(a(ia,:),c);
%! assert(b(ib,:),c);
+%!test
+%! a = [1 1 1 2 2 2];
+%! b = [1 2 3; 4 5 6];
+%! c = intersect(a,b);
+%! assert(c, [1,2]);
More information about the Bug-octave
mailing list