Command to show open a Simulink model and focus on a specific block
I've got a long list of comments in a separate document that开发者_如何学运维 refer the named subsystem blocks within a Simulink model. I'm going to process the document with a script that will generate a browser-viewable page, with each block name clickable - such that when you click on the block name, Matlab will launch using a CLI command, and display the model which the comment refers to.
The document generation and shell function call is all working, but I can't find a command that will centre on a specific block. I'm looking for a type of "find/search" function to centre the view on a specified block, once the model has been opened using a standard open command from the command-line.
I suspect that it might not be possible, but worth asking. Any ideas?
Thanks
Use the hilite_system command. For example:
hilite_system( 'myModel/Path/to/my/block' );
The selected block is also highlighted, you can use the optional second parameter to remove highlighting, or customize it, if desired.
精彩评论