Mex-file works only in Matlab COMMAND Window
1 view (last 30 days)
Show older comments
Hi, I thought my mex-code was wrong because it didn't work for some inputs.
But i've just tried to run it from the Matlab Command Window, and it works !
How can this be possible ? Why it works in Command Window, and not in the Matlab Desktop ?
In Matlab Desktop, it doesn't really crash, it just hangs, never stops, I have to kill Matlab to stop it. I thought it was an infinite loop in the mex-code, but it works in command window.
Thanks.
4 Comments
Jonathan Sullivan
on 11 Jun 2013
Sounds like there may be a bug in your mex file. Most likely a memory management issue.
Answers (3)
Jan
on 11 Jun 2013
If the MEX confuses the memory manager, the results are random. So your observed relation between starting Matlab without Java and the successful run of your program can be an illusion. Even trying it 1000 times will not prove, that the MEX works correctly then.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!