Borrar filtros
Borrar filtros

mexfunction

1 visualización (últimos 30 días)
yawai tint
yawai tint el 13 de En. de 2012
please guide to me i have C++ program that is long and complete algorithm however i call this program from matlab because i have some difficulty to rewrite this C code to m file. so pls tell me how to cal this C code from matlab.And then how to write mex function. pls explain me!
  1 comentario
Titus Edelhofer
Titus Edelhofer el 15 de En. de 2012
Hi,
I guess this is related to http://www.mathworks.com/matlabcentral/answers/13952-convert-c-code-to-matlab-mex-file?
You probably get a more specific help when asking more specific questions...
Titus

Iniciar sesión para comentar.

Respuesta aceptada

Maider Marin
Maider Marin el 13 de En. de 2012
you create a mexFunction in which you tell matlab how many outputs and inputs and you read your inputs and define your outputs. I think this link can help you
The truth is you need to play with it, in that page there are very simple but meaningful examples. It also points you to build in examples inside matlab.
  2 comentarios
Maider Marin
Maider Marin el 15 de En. de 2012
This tutorial, help me a lot when I was begining
http://www.engineering.uiowa.edu/~dip/lecture/C++_with_Matlab.pdf
Maider Marin
Maider Marin el 15 de En. de 2012
If you use Matlab this example is very ilustrative
http://www.mathworks.com/support/tech-notes/1600/1603_files/mexample.c

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by