I have met an issue which I believe needs posting here as a feedback of using convhulln, and if there is any solution or updated version, please give me a clue.
The issue is as titled. Matlab crashes in some large data set when I use vert2con function. It calls convhulln built in function, and convhulln calls qhullmx function. I debugged for a while and find the crash is due to qhullmx.
My data set is not too large, for instance 66*11 as input for vert2con. Also, the same size data set (not the same data set) can return results sometime. The troubling data set should form a pretty small convex hull. When the hull is bigger, vert2con works fine.
I guess qhull may have some bugs, but that's sort of beyond my focus.
Thanks for any suggestion.
Best,
Sandro
------------------------------------------
There are several routines that internally allocate scratch memory
arrays based on the size of the array you're passing in. Sometimes
you will get out of memory errors. A workaround that may work is to
subsample and then scale up when it's all done. Or else see this:
http://www.mathworks.com/support/tech-notes/1100/1107.html
"Sandro " <chin...@gmail.com> wrote in message
news:ikjd9b$3l5$1...@fred.mathworks.com...
I don't see any function named VERT2CON listed in the documentation. Please
send your data set, the exact command you use to call VERT2CON, the VERT2CON
function (and any helper functions required to run VERT2CON) and the output
of the VER function to Technical Support so that they can further
investigate the cause of this crash. Alternately, if you can determine
exactly how VERT2CON calls CONVHULLN and send Support the syntax and data
for that call, you wouldn't need to send VERT2CON.
--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
That seems like a pretty large computation. For example, when I ran on only 9-dimensional data it took over 10 sec. and generated 6 MB of constraint data.
tic; [A,b]=vert2con(rand(66,9)); toc
Elapsed time is 12.898464 seconds.
Name Size Kilobytes Class Attributes
A 83114x9 5843.9531 double
b 83114x1 649.3281 double
Also, if the convex hull is "small" it might be hard for the program to distinguish between solid and non-solid data, like in the following:
>> V=[0,0 0 ; 1 0 0 ; 1 0 0 ; 1 1 0]
V =
0 0 0
1 0 0
1 0 0
1 1 0
>> [A,b]=vert2con([V])
??? Error using ==> qhullmx
The data is degenerate in at least one dimension - ND set of points lying in (N+1)D space.
Error in ==> convhulln at 65
[k,vv] = qhullmx(x', opt);
Error in ==> vert2con at 46
k = convhulln(V);
Configuration:
MATLAB Version: 7.10.0.499 (R2010a)
MATLAB License: 161051
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 3)
Processor ID: x86 Family 6 Model 7 Stepping 6, GenuineIntel
Virtual Machine: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Encoding: windows-1252
Fault Count: 1
Register State:
EAX = 00000014 EBX = 00000002
ECX = 00000000 EDX = 00000001
ESI = 63207265 EDI = 00002000
EBP = 00000000 ESP = 00c2c418
EIP = 7c757450 FLG = 00010206
Stack Trace:
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/ts/help_request_1.html
A technical support engineer might contact you with further information.
Thank you for your help. MATLAB may attempt to recover, but even if recovery appears successful,
we recommend that you save your workspace and restart MATLAB as soon as possible.
Caught MathWorks::System::FatalException
[Please exit and restart MATLAB]>>
********
"Matt J" wrote in message <ikjf8n$cja$1...@fred.mathworks.com>...