How to convert std vector to coder::array

22 次查看(过去 30 天)
Hi,
I am migrating the code from matlab to c++
I have a auto generated c++ code from matlab here
myfun(coder::array<double, 1U>& x)
{
//body here which is auto generated
}
Now I want to integrate this code with software
But I have the respective input values in std::vector my_vec
question is how should I convert the vector into coder::array so that I can call myfun
Note: The vector is dynamic in size.

回答(1 个)

Darshan Ramakant Bhat
Below document shows an example of creating a coder array and filling up it's values
Hope this will be helpful for you.

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by