Simscape subsystem: How to declare large parameters

4 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Composite Components 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by