Azzera filtri
Azzera filtri

Create mexFunction for C source code

1 visualizzazione (ultimi 30 giorni)
shdotcom shdotcom
shdotcom shdotcom il 28 Lug 2019
Commentato: James Tursa il 29 Lug 2019
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 Commento
James Tursa
James Tursa il 29 Lug 2019
Most of the readers don't like clicking on random links. Can you attach the code instead?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by