How to convert std vector to coder::array

조회 수: 23 (최근 30일)
C Mendonsa
C Mendonsa 2020년 12월 3일
댓글: C Mendonsa 2020년 12월 3일
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
Darshan Ramakant Bhat 2020년 12월 3일
Below document shows an example of creating a coder array and filling up it's values
Hope this will be helpful for you.
  댓글 수: 1
C Mendonsa
C Mendonsa 2020년 12월 3일
Thank you..!
This document is helpful

댓글을 달려면 로그인하십시오.

카테고리

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