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

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    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.3