Can I use MATLAB Coder 2.1 (R2011b) to generate C code from MATLAB code that has cell arrays?
조회 수: 3 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2011년 12월 8일
편집: MathWorks Support Team
2015년 2월 10일
My MATLAB code that has cell arrays returns an error when I try to generate code using MATLAB Coder 2.1 (R2011b). Does MATLAB Coder support code generation from cell arrays?
채택된 답변
MathWorks Support Team
2013년 10월 18일
MATLAB Coder 2.1 (R2011b) does not support code generation from cell arrays. Hence, there is no way to utilize them within the MATLAB code.
However, MATLAB Coder does support structures, so a rough workaround could be implemented if you were willing to convert all of your cell arrays into structures. Some functions that can help with this process are CELL2STRUCT and STRUCT2CELL.
Please note that these functions must be used outside of the MATLAB code, such as from the command window or through a script or function that is not intended to be used with MATLAB Coder for code generation.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!