Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can we change output state of delay block during simulation ot its initial value using command prompt

1 Ansicht (letzte 30 Tage)
I want to change output state of delay block to initial value during simulation.
This should happen when that subsystem gets enabled.
But I dont want to change "States when enabling" property to "Reset". Is this possible what enable block do we can do using command prompt? So it will change state of output block as same as when enable subsystem "Reset"

Antworten (2)

Kaustubha Govind
Kaustubha Govind am 16 Okt. 2012
If you use the Unit Delay Resettable block, you should be able to reset it using the reset input port instead.
  2 Kommentare
Kishor
Kishor am 16 Okt. 2012
Yes, I got you point but, I am not allowed to do any changes in the implementation. Otherwise I can simply change the property of its parent enable port as "reset". Is there any way I can achieve that using command line and MATLAB embedded function. MATLAB do this in the background depending upon option selected in enable port mask. Can we do same thing using command line.
Kaustubha Govind
Kaustubha Govind am 17 Okt. 2012
Could you explain what you mean by: "MATLAB do this in the background depending upon option selected in enable port mask."
AFAIK, that setting cannot be changed during simulation. If you want to do it before simulation starts, you can of course use:
set_param('path/to/enable/port', 'StatesWhenEnabling', 'reset')
If you can't change that block (library block?), then perhaps you could connect another Enable Subsystem at the output of that block and used the solution I suggested here. Use the same initial condition as that for the library block.

Azzi Abdelmalek
Azzi Abdelmalek am 16 Okt. 2012
Bearbeitet: Azzi Abdelmalek am 16 Okt. 2012
if ModelName is your model name
set_param('ModelName/Unit Delay','x0','10')

Diese Frage ist geschlossen.

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by