bugGNU Octave - Bugs: bug #53979, convhull(pts) and convhull(X,Y,Z)...

 
 

bug #53979: convhull(pts) and convhull(X,Y,Z) should work for Matlab compatibility

Submitter:  None
Submitted:  Fri 25 May 2018 05:32:46 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  b9 Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Nov 2018 01:20:51 AM UTC, comment #2: 

I modified convhull.m to add support for 1- and 3-input calling styles.  See changeset https://hg.savannah.gnu.org/hgweb/octave/rev/e97a0d4ed5d0.  This will be a part of Octave 5.0 scheduled for release at the end of the year.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Tue 12 Jun 2018 06:47:26 PM UTC, comment #1: 

Matlab regularly changes the syntax of their functions slightly.  Marking bug as confirmed.  This is a easy fix for anyone who wants to try their hand at coding an m-file.

The function to change is scripts/geometry/convhull.m and there is already a template in scripts/geometry/delaunay.m where 1, 2, or 3 arguments can be passed.

Rik <rik5>
Group administrator
Fri 25 May 2018 05:32:46 AM UTC, original submission:  

It appears that matlab's convhull() now accepts a single matrix:

    matlab>  convhull(pts)

while Octave still requires separate X and Y arrays:

    octave>  convhull(pts(:,1), pts(:,2))

In addition, matlab's convhull accepts three arrays as representing 3-D space:

    matlab>  convhull(X, Y, Z)

Octave's convhull is limited to 2-D.

Please compare:

https://octave.org/doc/interpreter/Convex-Hull.html#Convex-Hull
https://www.mathworks.com/help/matlab/ref/convhull.html

I think these two problems should be simple to fix as convenience wrappers to convhulln.

One slight trickiness might be that the single matrix can be any number of dimensions, not just 2-D. It is likely that straight mapping to convhulln, which already handles that, will work, but I am not sure of the details.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-19 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-06-12 rik5 StatusNone Confirmed
        Releaseother dev
        Operating SystemGNU/Linux Any
        Summaryconvhull(pts) and convhull(X,Y,Z) should work convhull(pts) and convhull(X,Y,Z) should work for Matlab compatibility

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code