Embedded coder: How to have a function return a 2D array ?

조회 수: 1 (최근 30일)
Hank
Hank 2012년 9월 26일
A certain variable in a MatLab function is a 2D array (having both rows and columns). This is clearly visible when MatLab prints the variable: it shows the data in 128 rows and 3 columns.
This variable is returned by my function as a return parameter.
After code generation, this return parameter shows up as "real_T foo[384]" where I had expected "real_T foo[128][3]" (or [3][128]), or even better, as a emxArray_real_T *.
Can I instruct the embedded coder to return the array as 2D ?
  댓글 수: 1
Hank
Hank 2012년 9월 26일
Further information: the remarkable part is, that with another MatLab function, which returns a 1D vector, the code generator does use the emxArray_real_T type for the return parameter...

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by