Borrar filtros
Borrar filtros

How to change property of multiple gain block?

4 visualizaciones (últimos 30 días)
Himadri Debnath
Himadri Debnath el 16 de Mzo. de 2021
Respondida: Fangjun Jiang el 16 de Mzo. de 2021
I have a simulink model which has hundreds of gain block. Each of the gain block has different values. I want to change property of each of these block. Is there any way that I can change it at a time?

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 16 de Mzo. de 2021
Use block handles to change multiple blocks in one shot, assuming the values are the same. Turn on 'FindAll' to return block handles in find_system()
open_system('f14');
hBlocks=find_system('f14','FindAll','On','BlockType','Gain');
set(hBlocks,'BackgroundColor','Green')

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by