MATLAB: How to convert to Mex from Cpp using Xcode ver 10

conversioncppiosmacmexxcode

For Mac Users, I need that info. Thanks

Best Answer

Your SegmentBoneDP.cpp file is the source code.
If you need something that converts C++ code into MATLAB code, then you are using the wrong product family. There is no known program that converts C++ code into MATLAB code.
"The point is that I don't know the number and type of inputs the function requires since I cannot open it to see it. "
You read them out of the C++ source code.
Bness = (double *)mxGetData(prhs[0]);
double *pF0,*pF1,*pBth,*pJumpConst;
pF0 = (double *)mxGetData(prhs[1]);
pF1 = (double *)mxGetData(prhs[2]);
pBth = (double *)mxGetData(prhs[3]);
pJumpConst = (double *)mxGetData(prhs[4]);
The first parameter is Bness, and is a 2D double array.
The second parameter is F0, and it is a double scalar. It appears to be used as a weight or smoothing factor
The third parameter is F1, and it is a double scalar. It appears to be used as a weight or smoothing factor
The fourth parameter is Bth, and it is a double scalar. It is a threshold between bone and no bone.
The fifth parameter is JumpConst, and it is a double scalar. It appears to be some kind of penalty for moving from bone to no bone.
The output is an array the same size as Bness, and it is a real double 2D array.