I first used this toolbox in MATLAB R2008a and it worked pretty fine. Short time ago I switched to MATLAB R2009b (Windows 7, 64bit) and when using the tool I received one of the following errors:
Error type 1:
??? Error using ==> contourc
Input matrix contains no finite values - unable to calculate contours
Error in ==> contours at 57
CS=contourc(varargin{numarg_for_call});
Error in ==> ac_hybrid_model at 90
c = contours(phi,[0,0]);
Error type 2:
MATLAB System Error
MATLAB has encountered an internal problem and needs to close.
Details:
MATLAB crash file:C:\Users\Stefan\AppData\Local\Temp\matlab_crash_dump.3776
------------------------------------------------------------------------
Segmentation violation detected at Fri Apr 23 16:08:01 2010
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.9.0.529 (R2009b)
MATLAB License: 161051
Operating System: Microsoft Windows Vista
Window System: Version 6.1 (Build 7600)
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) 64-Bit Server VM mixed mode
Default Encoding: windows-1252
At last I tracked down the problem in the MATLAB - bwdist() function which is used in the functions ac_reinit and ac_SDF_2D. In R2008a it returned an array of type double, in R2009b it returns an array of type single (despite the fact the documentation says it should be double).
After changing the line 25 in ac_reinit.m from
u = bwdist(u0).*sign(u); to u = double(bwdist(u0)).*sign(u);
and the lines 82, 91 and 120 in ac_SDF_2D.m from
phi = -bwdist(phi); to phi = -double(bwdist(phi));
phi = radius - bwdist(phi); to phi = radius - double(bwdist(phi));
phi = bwdist(phi); to phi = double(bwdist(phi));