how to change a variable value in the middle of simulation in simulink

3 views (last 30 days)
I am giving pulse to a mosfet through pulse generator and i want to vary the pulse witdth to another value after 2 sec. How can i do it in simulink
kesava rao
kesava rao on 28 Jan 2021
Thank u for responding
here in pulse generator i assigned P=80 in call back -int function
after 1 sec i want to change it to p=30 ...can you show a way to change

Sign in to comment.

Answers (1)

Birdman on 28 Jan 2021
Edited: Birdman on 28 Jan 2021
Try the attached model. Copy the structure and replace it with the pulse generation block. It should work. Instead of writing p inside the constant block, just write the numerical value, 80 or 30.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!