Simscape subsystem: How to declare large parameters
3 views (last 30 days)
Show older comments
Hi,
I am creating a library of simscape blocks which is mainly for internal use. Nevertheless, I want to be able to send protected versions of the individual blocks to customers as well. I protect the models via subsystem2ssc and then ssc_mirror.
The library components are masked subsystems containing only simscape blocks from the default library.
So I spent some time thinking about where to store the block parameters. I decided to declare them in the mask initialization, so they are bound to the subsystem and when I create a protected model of the subsystem, the parameters do not get lost. This works fine so far.
My problem is: Sometimes the parameters can be big arrays. I.e. for a 2d-Lookup Table with 1000x1000 entries, one parameter would have the dimension 1000x1000. It is a quite big effort to copy-paste the values into the mask initialization window.
A solution would be to store this big array in a .CSV - file, and call this file in the mask initialization (i.e. param1 = csvread('parameter_array.csv');). But then when I protect the subsystem and send it to a customer, the parameters are missing because the CSV-file is not attached to the subsystem.
Do you have a better idea on how to declare a large array as a parameter in a simscape subsystem?
0 Comments
Answers (0)
See Also
Categories
Find more on Composite Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!