How do I load a cell array from the workspace into a Simulink model?
조회 수: 7 (최근 30일)
이전 댓글 표시
I'm having trouble being able to call upon a cell containing a lidar scan within each element inside of Simulink. I need to use the cell as an input to a Matlab function block which runs a script and picks lidar scans from the cell. In total there are over 2000 lidar scans but I don't think the number of scans should matter?
Also as an alternative to using a Simulink block to load the cell from the workspace I tried to load it into the script which I was running in the model. However, when I try to run the script in the function block, it comes up with errors for using the load function and not recognising the file even though I've tried the function in the command box and it works fine. The error comes up as the code below but in the Simulink diagnostic viewer.
Found unsupported class for variable using function 'load'.
Code generation does not support importing handle classes from MATLAB.
Use the command 'whos -file project_FSSGrid.mat' to view the variables in the MAT file.
Function 'CarMaker/CM_LAST/MATLAB Function' (#74.87.114), line 3, column 8:
"load('project_FSSGrid.mat')"
Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Does anyone have any other suggestions on how to call upon the cell variable for the script? Any help would be greatly appreciated!
댓글 수: 2
Benoit Beaulieu
2022년 12월 24일
Same issue, The customtable from the subsystem masks outputs a cell array.
답변 (1개)
Leonard Classen
2019년 9월 5일
I am having the same problem.
I want to load a struct which contains symbolic expressions into a matlab function in a simulink model.
However, the Diagnostic viewer says: "Code generation does not support importing handle classes from MATLAB."
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!