controlling manual switch through m-file
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Krishnendu Mukherjee
el 13 de Mzo. de 2012
Comentada: Jon
el 28 de Jul. de 2020
there in a manual switch,which can be altered during run time.now if i want to alter the switch through m-file command.what to do?
Respuesta aceptada
Kaustubha Govind
el 13 de Mzo. de 2012
It looks like this should work
set_param('path/to/block', 'sw', '0')
set_param('path/to/block', 'sw', '1')
I found the names of the block parameters using this command, and just picked the one that seemed likely:
>> get_param(gcb, 'DialogParameters') % select the block first with the mouse
1 comentario
Jon
el 28 de Jul. de 2020
In version 2020A, for a manual switch (assuming it has just been selected)
get_param(gcb,'DialogParameters')
returns only the parameters varsize and SampleTime.
It seems that this 'sw' parameter does still give the switch postion, but where is this documented?
In particular is there a command similar to get_param(gcb,'DialogParameters') that would list this type of "hidden" parameter, or is there somewhere it would be listed in any of the documentation? I couldn't find it.
Thanks
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Functions 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!