- Create a separate library block that references your Simscape library block inside of it. This way, ssc_build won't affect this separate library and you can make updates without discarding your local changes. This library block will act as a "wrapper" subsystem and you can create your own mask over it.
- Set the variables/parameters you care about as "hidden" in the .ssc file itself. Then, create separate dialog parameters for what you want users to specify. The setup section of your .ssc file can then be used to compute the real variables based on whatever you expose to the user.
Edit Mask for Simscape Block
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anneff
am 16 Okt. 2015
Bearbeitet: Sebastian Castro
am 19 Okt. 2015
Is it possible to edit the mask properties of a component before using ssc_build to build the library? For example: I'd like to list the initial conditions as parameters in a model with two-phase flow. The initial conditions are dependent on the fluid regime, so I'd like to add a popup, where the regime can be selected and in result only the appropriate needed variables appear (a dynamic mask).
0 Kommentare
Akzeptierte Antwort
Sebastian Castro
am 19 Okt. 2015
Bearbeitet: Sebastian Castro
am 19 Okt. 2015
You cannot modify the mask directly as you are suggesting. There are 2 ways I can think of to get around this:
parameters
y = 0; % Exposed to the user
end
parameters (Hidden = true)
x = 0; % Hidden from the user
end
function setup
x = 2*y + 5; % Internal initialization calculations, as needed
end
- Sebastian
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating Custom Components and Libraries finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!