4.71429

4.7 | 7 ratings Rate this file 6 Downloads (last 30 days) File Size: 17.72 KB File ID: #6243
image thumbnail

hullfit

by Peter Wasmeier

 

11 Nov 2004 (Updated 15 Nov 2004)

Fit polygon hull to a data set better than convhull would do.

| Watch this File

File Information
Description

When interpolating on a given data set, convhull is used to set the boundaries of the interpolation area. Because convhull only minimizes the outline length, there might be interpolation lines which are unwanted (see figure).

hullfit tries to minimze the polygon area instead resulting in a hull line fitting sharper to the given data.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
13 Mar 2005 chris roman

good, seems to work as advertised.
thanks

19 Apr 2006 Flo Pap

Perfect - much better than convhull.

20 Sep 2006 J M

Fantastic!

08 Oct 2006 David Müller  
21 Aug 2007 Joachim Schnellbächer

Good

31 Aug 2007 Jon Barron

Hey, great script. I found a small bug though, which I was able to fix by changing the two "find" calls from "find(X)" to "find(X, 1, 'first')". Otherwise errors get thrown or results are poor for certain images.

16 May 2010 Christine Acou  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
convhull Peter Wasmeier 22 Oct 2008 07:35:15
polygon Peter Wasmeier 22 Oct 2008 07:35:15
area Peter Wasmeier 22 Oct 2008 07:35:15
hull Peter Wasmeier 22 Oct 2008 07:35:15
mathematics Peter Wasmeier 22 Oct 2008 07:35:15
general Peter Wasmeier 22 Oct 2008 07:35:15

Contact us at files@mathworks.com