MATLAB: How to save the custom storage classes such that they can be given to other users

cscdesignerEmbedded Coderpackagesimulinksldataclassdesigner

I created several custom storage classes that I am using in my model. I would like to save these custom storage classes along with my model so that I can easily distribute this model to other people.

Best Answer

The ability to save custom storage classes along with the Simulink model is not available in Simulink.
As a workaround, you can ship the files or directories that are created by Simulink to define the custom storage class or custom package along with your model. More information as well as guidelines to creating custom packages is available at the following location:
Creating Packages with CSC Definitions :: Custom Storage Classes (Real-Time Workshop Embedded Coder)
When a new package, MyNewPackage, is created with the Simulink Data Class Designer (SLDATACLASSDESIGNER), a directory, @MyNewPackage, is created in the location specified with the Data Class Designer GUI.
Shipping this directory to the users and having them place it on the MATLAB path on their systems will provide them with the custom storage class definitions.