How to convert std vector to coder::array

23 visualizaciones (últimos 30 días)
C Mendonsa
C Mendonsa el 3 de Dic. de 2020
Comentada: C Mendonsa el 3 de Dic. de 2020
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.

Respuestas (1)

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

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by