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

7 vues (au cours des 30 derniers jours)
Amrik Sandhu
Amrik Sandhu le 7 Fév 2019
Commenté : Benoit Beaulieu le 24 Déc 2022
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 commentaires
ANASTASIOS TSOLAKIS
ANASTASIOS TSOLAKIS le 13 Sep 2020
Same problem here
Benoit Beaulieu
Benoit Beaulieu le 24 Déc 2022
Same issue, The customtable from the subsystem masks outputs a cell array.

Connectez-vous pour commenter.

Réponses (1)

Leonard Classen
Leonard Classen le 5 Sep 2019
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."

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by