I am trying to call an external C++ function, which is a void type function. Here is the code I wrote as an example
function [Y] = example(a,b)
coder.ceval('cpp_fun', a, b, Y);
The C++ function is defined as:
void cpp_fun(int a, float *b, float *Y);
Here int a, float *b are input of the function and *Y is suppose to be the output of the C++ function.
But when I use the Matlab Coder to convert the matlab function above, I get the following error message: "Variable 'Y' is not fully defined on some execution paths."
Shoud I use something like
in the matlab function to define Y? If yes, what type should I use for Y?
Any help is greatly appreciated!