Removing all highlightning programmatically

Hello,

I am creating/deleting programmatically some simulink functions recursively, and for debug purpose, I hilghlight blocks I’m currently working on with the hilite_system function, for example:

hilite_system(gcbh)

I know I can remove the highlighting of a specific block by doing:

hilite_system(gcbh,'none')

But I don’t manage to remove all the highlighting at once.

My question is, is there a simple way to do a global “Remove Highlighting” just like Simulink does (without specifying some blocks), or do I have to make a loop and force all my blocks to none one after another? It would work, but it feels like crushing a fly with a cannon.

I found the function remove_hilite.p but I don’t manage to do what I intend with some random arguments.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Expert Answer

Neeta Dsouza answered . 2021–10–21 08:21:04

There is no single function that can do this. You will need to use a collection of find_system and hilite_system to do this. Example below.

% Get highlighted blocks. Idea is to look for all blocks with yellow background (default highlight color). 
% This results in a cell array of paths to all blocks that satisfy this condition.
% Note that if your highlight color is different or more than one color, you would need to run an
% appropriate or multiple commands to get the list of all blocks highlighted no matter what color.
hilited_blocks = find_system('my_model','BackgroundColor','yellow')% Pass block list to hilite_system to switch 'off' color.
hilite_system(hilited_blocks,'off')

Not satisfied with the answer ?? ASK NOW

SEE COMPLETE ANSWER CLICK THE LINK

--

--

--

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hyperledger Fabric Development using composer Part 2

Code generation with go

Currying in Erlang

GitHub Process

Learn TDD in Ruby in 5 easy steps

Digital Transformation Roadmap for Joint Integrity

Cyber Monday Sale: Save up to 65% on Node.js Certifications and Training

Cyber Monday: Training and Certification Sale!

Creating Terminal Shortcuts via bash_profile Updates on a Mac using Atom Text editor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

More from Medium

Install TensorFlow with GPU Acceleration Simultaneously for Windows and WSL Linux (2)

Budget CPUs for machine learning -2021/2022 (Xeons)

How to find phase shift and do phase shift correction between two signals in frequency domain?

ResNet50 vs ResNeXt50: an experiment with CIFAR10 data