Hello,
I am trying to generate an S-Function code from a C++ source code in which I wish both input and output to be arrays.
In my C++ code the function follows:
double* function(double param1[], param2[])
{
double *varReturn = new double[sizeof(param1[])];
…
//body
…
return varReturn;
}
In the Matlab environment I enter the Output definition:
def.OutputFcnSpec = 'double y1 = TPh(double u1[], double u2[])'; then I get the
error:
error C2440: '=' : cannot convert from 'double *' to 'real_T',
logically due to "double y1" does not be an array nor a pointer declaration. However I am having a hard time in write the output definition to make it work.
Can someone please give me some help with this. I sense I am being careless at some details or I have a misunderstanding.
Thank you.
Sincerely,
Dan
Best Answer