필터 지우기
필터 지우기

Simulink Embedded Coder: has no support of variable-size arrays

조회 수: 5 (최근 30일)
Dimitri
Dimitri 2024년 2월 27일
답변: Divyanshu 2024년 3월 5일
Hello everyone!
I need to re-wite a little banch of code for Embedded Coder wich has no support of variable-size arrays.
For my Harware-target I could not enable the support of variable-sized arrays.
Could you please suggest, how I can do it in the most efficient way?
function [seconds, minutes, hours, days, months, years] = fcn(posixTime)
date = datetime(posixTime,'ConvertFrom','posixtime');
[years, months, days] = ymd(date); % <-- Logical indexing requires support of variable-sized arrays, which is currently disabled for code generation.
[hours, minutes, seconds] = hms(date); % <-- Logical indexing requires support of variable-sized arrays, which is currently disabled for code generation.
end

답변 (1개)

Divyanshu
Divyanshu 2024년 3월 5일
Hi Dimitri,
It is possible to Enable & Disable the Support for Variable-Size Arrays.
Please refer the following documentation for details on Code Generation for Variable-Size Arrays and how to enable the Support for Variable-size arrays in Code Generation:
Hope it helps!

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by