mexfunction

조회 수: 1 (최근 30일)
yawai tint
yawai tint 2012년 1월 13일
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
Titus Edelhofer
Titus Edelhofer 2012년 1월 15일
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

댓글을 달려면 로그인하십시오.

채택된 답변

Maider Marin
Maider Marin 2012년 1월 13일
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
Maider Marin
Maider Marin 2012년 1월 15일
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 2012년 1월 15일
If you use Matlab this example is very ilustrative
http://www.mathworks.com/support/tech-notes/1600/1603_files/mexample.c

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by