Wie man die Simulink-Manual-Switch-Position programmatisch setzt
Sie können die Position eines Simulink-Manual-Switch programmatisch mit der set_param-Funktion in MATLAB setzen:
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