Why does MATLAB crash when I use GARCHLLFN?
I have the following code in MATLAB:
R=1;M=0;P=1;Q=1;X=[];C=1.3;AR=0.1;K=0.5;GARCH=0.9;ARCH=0.05;spec=garchset('R',R,'P',1,'Q',1, 'C', C,'AR',AR,'K',K,'GARCH',GARCH,'ARCH',ARCH);[Innovations, Sigma, y] = garchsim(spec,500);Parameters=[C,AR,K,GARCH,ARCH];[LL,G,H,Inno,Sig] = garchllfn(Parameters,y,R,M,P,Q,X);
If I run this code, I get the following error:
------------------------------------------------------------------------ Assertion detected at Mon Jun 03 15:21:19 2002 ------------------------------------------------------------------------ Assertion failed: (hdr->in_use != 0), at line 870 of file "./mwmem.c". Attempt to free previously freed memory Configuration: MATLAB Version: 6.0.0.88 (R12) Operating System: Microsoft Windows 2000 Window System: Version 5.0 (Build 2195: Service Pack 2) Processor ID: x86 Family 6 Model 8 Stepping 6, GenuineIntel Virtual Machine: Java 1.1.8 from Sun Microsystems Inc. Stack Trace: [0] matlab.exe:_mnSignalHandler(0xffffffff, 0, 0, 1) + 452 bytes [1] matlab.exe:_ThrowAssertion(0x1d8e6140, 0, 0x65737341, 0x6f697472) + 167 bytes [2] matlab.exe:_MATLABAssertFcn(0x015df108 ": (hdr->in_use != 0),", 0x015deaa4 "./mwmem.c", 870, 0x015df120 "Attempt to free previously freed..") + 131 bytes [3] libut.dll:_ut_assertstr(0x015df108 ": (hdr->in_use != 0),", 0x015deaa4 "./mwmem.c", 870, 0x015df120 "Attempt to free previously freed..") + 25 bytes [4] libut.dll:_mw_free(0x1d8e6148, 2, 0x028fccc8, 0x014baa20) + 239 bytes [5] libut.dll:_utFree(0x1d8e6148, 1, 0x028fccc8, 0x014baa30) + 25 bytes [6] libmx.dll:_mxDestroyArrayContents(0x028fccc8, 502, 0x014baa70, 0x24b91448) + 175 bytes [7] libmx.dll:_mxDestroyArray(0x028fccc8, 0x028f15f8 "C:\WINNT\Profiles\MBERKE~1.MAT\L..", 0x1db47430, 0x1db51ec8) + 50 bytes [snip]
Best Answer