How do I load a cell array from the workspace into a Simulink model?

조회 수: 8 (최근 30일)
Amrik Sandhu
Amrik Sandhu 2019년 2월 7일
댓글: Benoit Beaulieu 2022년 12월 24일
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
Benoit Beaulieu 2022년 12월 24일
Same issue, The customtable from the subsystem masks outputs a cell array.

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

답변 (1개)

Leonard Classen
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."

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by