Trigger a square pulse of programmatic width and amplitude in Simulink
I needed to trigger a square wave pulse using a signal within my Simulink model (in my case it was a position vector). All I could find within the Sim Library was pulses set to activate at a certain time (by using a delay or building a signal from scratch). So I baked one myself.
The biggest problem was the inability to "reset" the clock (I wanted to use it as a timer to set the width of my pulse). As a substitution for the clock timer, I compare the output of pulse_amplitude => integrator block with the value = pulse_amplitude*pulse_width.
Cite As
Jared Goodner (2024). Trigger a square pulse of programmatic width and amplitude in Simulink (https://www.mathworks.com/matlabcentral/fileexchange/39464-trigger-a-square-pulse-of-programmatic-width-and-amplitude-in-simulink), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |