Block path relative to masked subsystem
13 views (last 30 days)
Show older comments
Hi there, I'm doing some initialization work in a masked subsystem's initialization callback. I want to set parameters of contained blocks. Currently the only working technique I could come up with is
set_param('model-name/path-to-this-mask-block/child-block', 'param', value );
Is there a way to specify the path relative to the block the mask is for? I tried many combinations including the simple
set_param('child-block', 'param', value );
but nothing I tried would work.
0 Comments
Accepted Answer
Sebastian Castro
on 27 Mar 2016
There is a gcb command which stands for "get current block"... so in your case you can use:
set_param([gcb '/child-block'],'param','value');
- Sebastian
More Answers (0)
See Also
Categories
Find more on Subsystems in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!