Effacer les filtres
Effacer les filtres

How to run matlab executable c code file?

3 vues (au cours des 30 derniers jours)
Nikhil
Nikhil le 23 Juin 2014
Modifié(e) : James Tursa le 24 Juin 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

Réponses (1)

James Tursa
James Tursa le 24 Juin 2014
Modifié(e) : James Tursa le 24 Juin 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.

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by