필터 지우기
필터 지우기

Create mexFunction for C source code

조회 수: 1 (최근 30일)
shdotcom shdotcom
shdotcom shdotcom 2019년 7월 28일
댓글: James Tursa 2019년 7월 29일
Hi,
I have this source code in C, and I want to call it from Matlab using the mexFunction.
In this code there are many command line arguments in the acotsp.c (the main function is here) and parse.c
In this case, how can I create the mexFunction?
I did this:
/***** acotsp.c file
int main(int argc, char **argv);
#include "mex.h"
#include <stdio.h>
#include <math.h>
#include <limits.h>
. . .
. . .
. . .
. . .
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
}
But, I do not know how to create the mexFunction. Could anyone guide me/help me out with writing this function?
  댓글 수: 1
James Tursa
James Tursa 2019년 7월 29일
Most of the readers don't like clicking on random links. Can you attach the code instead?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by