Using direct lookup table as input to a matlab function block in simulink => error in "Check Block Compatibility" of "HDL Workflow Advisor"
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello everyone,
In my Simulink model I have a matlab function block, with the following code:
function device_exist = look_4_device_addr(device_list, device_addr)
%#codegen
device_exist=logical(0);
for indice = 1:length(device_list)
if device_addr==device_list(indice)
device_exist=logical(1);
break;
end;
end;
and in my simulink model I have the following blocks:

as you can see I'm giving the matlab function block a "direct lookup table" as input "device_list", so the function can search for the device_addr inside this direct lookup table.
This works fine in simulation, but in the hdl workflow advisor i get the following error in the "check Block Compatibility" step:
Internal Error: Evaluation of validate function on class hd defaults.DirectLookupTable failed with the error message: MATLAB:cellRefFromNonCell: Brace indexing is not supported for variables of this type.
Can you please help me figure out the problem. Am I not supposed using direct lookup tables as arrays to a matlab function simulink block? also it's a bit strange because I'm not using any braces anywhere and why is this supposed problem not reported in simulation?
This is a capture of table data parameter:

Thank you for your help, very much appreciated.
댓글 수: 0
답변 (1개)
Kiran Kintali
2019년 2월 1일
Can you please send the reproduction steps to kiran.kintali@mathworks.com? We can help further analyze the issue.
thanks
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Nonlinearity에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!