Filter löschen
Filter löschen

How to run matlab executable c code file?

4 Ansichten (letzte 30 Tage)
Nikhil
Nikhil am 23 Jun. 2014
Bearbeitet: James Tursa am 24 Jun. 2014
Hello all,
I am trying to load one .c code file in Matlab. The file is Matlab executable. but when I try to load file with following code,
mex stress_SVD_1_matlab.c
I am getting following error:
Specified export _mexFunction is not defined Missing exports. Aborting
C:\PROGRA~2\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'stress_SVD_1_matlab.mexw32' failed.
Error using mex (line 206)
Unable to complete successfully.
I have attached .pdf version of my file here. Can somebody please guide me how to successfully load this file in Matlab?
Thanks you in advance,
Nikhil

Antworten (1)

James Tursa
James Tursa am 24 Jun. 2014
Bearbeitet: James Tursa am 24 Jun. 2014
Not sure if it will make a difference, but try changing these lines:
#include <matrix.h>
#include <mex.h>
to this:
#include "mex.h"
Also, I don't see the initialization( ) or evaluate( ) function bodies in the source code. Is what you posted really what you mex'ed? I would have expected more errors.
EDIT
Nevermind, I just saw that your entire source code is commented out! So you are compiling a completely empty file as far as non-comment source code is concerned, and thus there is no mexFunction.
Change this:
/*
#include <matrix.h>
#include <mex.h>
:
}
*/
to this:
#include "mex.h"
:
}
Then you will also have to deal with the initialization( ) and evaluate( ) funcion bodies as pointed out above.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by