Simulink
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
How can i multiple 's' to the gain(K) in feedback of my block diagram? I get the value of gain(K) from GUI window.
1 comentario
Respuestas (1)
K E
el 2 de Abr. de 2012
The set_param function can be used to set a value such as a gain. Here is an example. The gain value supplied to set_param must be a string, not a number.
for iGain = 1:length(listOfGainValues)
strGain = num2str(listOfGainValues(iGain)) ;
set_param('yourModel/yourBlock/Gain', 'Gain', strGain) ;
% Run your simulation here with this gain value
end
2 comentarios
K E
el 3 de Abr. de 2012
Can you please explain? Do you want your GUI to increase the gain prior to simulation, or do you want to add a block that increases the gain by a factor of s during the simulation, or...?
Ver también
Categorías
Más información sobre Programmatic Model Editing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!