how to use script to edit Mask?

1 view (last 30 days)
zdong
zdong on 26 Aug 2015
Commented: zdong on 26 Aug 2015
in Simulink, I have blocks in several liberies, in their Mask Editor: "Icon & Ports" they all have a drawing command something like: image(imread([libPath '\abc\' 'xyz'] ))
How can I use a script to change the command? I'm able to select the block in the model by using : set_param('ModelName','CurrentBlock','BlockName') but I tried to set_param('BlockName','param','value'), it gives me an error: No block diagram 'BlockName' is loaded.
Please advice. Thanks
  1 Comment
zdong
zdong on 26 Aug 2015
Sorry I'm a simulink beginner, trying to dig all the info out. Now I got the solution for the error "No block Diagram 'BlockName' is loaded", I have to use : set_param('ModelName/BlockName','param','value')
and the "Icon & Ports" is represented by the parameter 'MaskDisplay'
Thanks

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!