mexw64-files - MatCont package
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I've been trying the dynamical systems package MathCont to work on my PC (Windows 8, 64-bit), but somehow the mexw64 files aren't helping me. I downloaded them from
but running them in Matlab throws an error (see attached jpeg).
I should add that I am not familiar with mex-files of any sort, so maybe I am just making some 'obvious' mistake. Other blogs and Q&A's haven't helped so far.
Thanks for any sort of help! :)
5 comentarios
Abhiram Bhanuprakash
el 27 de Oct. de 2014
Hi Daniel,
From the error message, it looks like MATLAB is crashing when you 'run' the 64-bit MEX files from MatCont package. Can you please share the crash dump file generated by MATLAB, which could throw more light on this issue?
To locate the crash dump file, you can refer to the following article:
Also, as Jan Simon pointed out, can you please elaborate on what you mean by 'running' a MEX file, and why you are doing so?
Respuestas (2)
Geoff Hayes
el 27 de Oct. de 2014
Daniel - you are correct in thinking that the MEX files are built from C (or C++ or Fortran) code that you can then call from your MATLAB programs. In your case, the MEX file that you are trying to run, BVP_BPC_jacC is built from the C function matcont5p4/LimitCycle/BVP_BPC_jacC.C. This file (and the others) are built when I type the following in the Command Window from the matcont5p4 (the version that I downloaded) folder
matcont
If I then change directory to matcont5p4/LimitCycle, I will see the C file and the MEX function (BVP_BPC_jacC.mexmaci64, since I am running MATLAB on a Mac). If I then try to run this function (like you), then I observe a crash as well.
This behaviour, while undesirable, is expected as the C code is making certain assumptions about its input parameters. Since you are not passing any, then the code tries to access data that doesn't exist and so crashes. (Some checks could have been added to make sure that the correct number of parameters were being passed before it tried to make use of the parameters.)
This MEX function (and the others) should only be called from within the context of the matcont software, and not outside of it (unless you know what inputs each expects).
0 comentarios
Abhiram Bhanuprakash
el 28 de Oct. de 2014
Editada: Abhiram Bhanuprakash
el 28 de Oct. de 2014
Hi Daniel,
I am adding to what Geoff Hayes mentioned in his answer above.
Yes, you are right. MEX stands for MATLAB Executable, and this means that you can create a MEX file from a C/C++/Fortran code and run it in MATLAB. However, to do this, you would need to have a supported compiler, which in this case is Windows SDK 7.1.
From the crash dump, I think you have two issues:
1. As Geoff said, you need to give input arguments to the MEX function which you call.
2. You need to have a suported compiler installed, and point MATLAB to it.
After installing Windows SDK 7.1, you can point MATLAB to use it, by entering the following line of code in your Command Window:
>> mex -setup
0 comentarios
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!