I need to solve the problem in C++ code converted by matlab coder. When I call program the problem in emxCreateWrapper_real_T happens.
5 views (last 30 days)
Show older comments
I am trying to learn how to use standalone C++ code from Matlab. I have created a very simple function that takes only one argument, which is a vector of size (1,N), where N is unknown a priori. Therefore, I have to use dynamic allocated memory, if I am not wrong. The generated C++ code takes two arguments, of type emxArray_real_T, where strem is the input vector, and data the output Array of size(N/6,6),
void charrang (const emxArray_real_T *strem, emxArray_real_T *data)
{
...
}
int main()
{
double strem[12];
double data[2][6];
emxArray_real_T *inputs, *outputs;
for (int n=0; n<13; n++)
{
strem[n] = n;
}
inputs = emxCreateWrapper_real_T(strem, 1,12);
outputs = emxCreateWrapper_real_T(data, 6, 2);
charrang(inputs, outputs);
return 0;
}
0 Comments
Answers (0)
See Also
Categories
Find more on Generating Code in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!