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

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

[Octave-patch-tracker] [patch #8386] Fixed up "find" function with templ


From: David Spies
Subject: [Octave-patch-tracker] [patch #8386] Fixed up "find" function with templates and fourth parameter
Date: Mon, 10 Mar 2014 00:58:08 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:27.0) Gecko/20100101 Firefox/27.0

URL:
  <http://savannah.gnu.org/patch/?8386>

                 Summary: Fixed up "find" function with templates and fourth
parameter
                 Project: GNU Octave
            Submitted by: dspyz
            Submitted on: Mon 10 Mar 2014 12:58:07 AM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I cleaned up the "find" function adding templates to channel all calls to
'find' for all types into the same template function.

As a side-effect, this fixes the following matlab/full-matrix
incompatibility:
octave:3> a = sparse(0,0);
octave:4> size(find(a))
ans =

0 1

(Matlab and full matrices give 0 0)

Additionally I added a fourth parameter to specify the desired dimension of
the output vectors:
octave:3> a = eye(3);
octave:4> [i,j,v] = find(a,Inf,"first",2)
i =

1 2 3

j =

1 2 3

v =

1 1 1

Could someone please look over my changes?

Thanks




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 10 Mar 2014 12:58:07 AM GMT  Name: find4.diff  Size: 47kB   By:
dspyz

<http://savannah.gnu.org/patch/download.php?file_id=30842>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8386>

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




reply via email to

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