Incorrect number of arguments into mex file
Mostra commenti meno recenti
Hi All
I have a mex file that has worked for the last 10 years (up to R2015b) and now is giving me problems since I have upgraded my Matlab version. The problem is that I check the number of input arguments and when it is not equal to two it throws an error. When I call the mex function it now sometimes throws an error, where it does not seem to pass any arguments in. When I run through the debugger, stop at the mex function call, and then call, it seems to work. I am definitely passing in the correct arguments. The problem seems to be spurious and does not always show up. It seems to be some or other initialisation problem or something like this.
Any help would be appreciated
Etienne
3 Commenti
Etienne Coetzee
il 6 Mag 2017
Modificato: Etienne Coetzee
il 6 Mag 2017
Philip Borghesani
il 6 Mag 2017
I think were going to need a bit more information here. What platform(s) are you using? are both tested versions the same bit width? When you say it works when debugging do you mean the MATLAB debugger or a FORTRAN debugger?
If using the MATLAB debugger makes a difference we are going to need to see some MATLAB code from the call site and I suggest you add some test code in your MATLAB code to examine the arguments being passed from MATLAB when the debugger is not running.
Etienne Coetzee
il 6 Mag 2017
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!