controlling manual switch through m-file

Asked by Krishnendu Mukherjee on 13 Mar 2012
Latest activity Answered by Kaustubha Govind on 13 Mar 2012

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?

1 Comment

Krishnendu Mukherjee on 13 Mar 2012

its to tel that the manual switch is in simulink.

Krishnendu Mukherjee

Products

1 Answer

Answer by Kaustubha Govind on 13 Mar 2012
Accepted answer

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

0 Comments

Kaustubha Govind

Contact us