MATLAB Answers

Editing default simulink libraries

7 ビュー (過去 30 日間)
Jonathan Adams
Jonathan Adams 2016 年 2 月 1 日
コメント済み: Jonathan Adams 2016 年 2 月 1 日
I'm running version 2013b and I'd like to modify the default Simulink libraries for styling and ease of use. An example of this is input and output port colors (green for input, red for output) or removing the data limiting in the default Simulink scopes. One way I can edit them is to manually change the simulink.slx and simviewers.mdl files within the MATLAB folder structure, but this requires administrative permissions on the files. Is there another way to edit these kinds of properties in the default libraries?

回答 (1 件)

Ilham Hardy
Ilham Hardy 2016 年 2 月 1 日
編集済み: Ilham Hardy 2016 年 2 月 1 日
Is that even possible/allowed?
What I usually do is using script to give the model "make-over" by using find_system(),
list all the specified blocks and edit them using set_param() in the for-loop..
  1 件のコメント
Jonathan Adams
Jonathan Adams 2016 年 2 月 1 日
In theory this would work for some of the styling changes, and honestly making a custom default library would probably work for styling/mask parameter changes to default blocks. This solution doesn't work for attaching a viewer to a signal. (right click signal -> Create and Connect Viewer -> Simulink -> Scope)
This scope isn't the same as the scope block in the "Sinks" library and resides in a different library file. (simviewers.mdl) If you've ever wanted to see more than the default limited number of data points you have to manually deselect this in the scope properties every time you attach a scope.
In version 2010a all of these libraries were available for modification, but in 2013b the user's permissions were restricted to read and execute. An administrator must grant the user access to modify the files. I can understand why this would be restricted; I wondered if anyone knew a way within MATLAB to change library defaults.


Community Treasure Hunt

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

Start Hunting!

Translated by