Como definir a posição do Manual Switch do Simulink programaticamente
Você pode definir a posição de um Manual Switch do Simulink programaticamente usando a função set_param no MATLAB:
set_manual_switch.m
% Set the position of a Manual Switch block to the upper position
set_param('MySimulinkModel/Manual Switch', 'sw', '1');
% Set the position of a Manual Switch block to the lower position
set_param('MySimulinkModel/Manual Switch', 'sw', '0');Check out similar posts by category:
Matlab/Simulink
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow