octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44453] Intersect function returning neither c


From: anonymous
Subject: [Octave-bug-tracker] [bug #44453] Intersect function returning neither complete vector of common elements nor indices
Date: Fri, 06 Mar 2015 16:44:51 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?44453>

                 Summary: Intersect function returning neither complete vector
of common elements nor indices
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 06 Mar 2015 04:44:50 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: David
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Here is a minimum working example that should illustrate the function's
deficiencies:

length = 1000; %or any number you desire
randNum = 14;

A = randNum*ones(1, length);

B = randNum*ones(1, length);

[C, Ia, Ib] = intersect(A, B);

As described in the header, intersect does not return the correct output. In
this instance, I observe the output as follows, 
C =  14
Ia =  1000
Ib =  1000

when clearly C, Ia, and Ib should all be 1x1000 vectors where C is the common
value 14, and Ia and Ib contain the numbers 1 thru 1000 or 
C = [14, 14, 14, etc...] 
Ia = [(1,1),(1,2),(1,3), etc...]
Ib = [(1,1),(1,2),(1,3), etc...]

Thanks for making Octave what it is today!




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44453>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]