This simple function simulates a pulse width modulator for a scalar or vector input, with a settable resolution.
Video demonstration:
https://www.youtube.com/watch?v=qS2Hjg8Ik0o&feature=youtu.be&ab_channel=Pseudonymeoriginal
Cite As
Eric Ogier (2026). PWM (https://www.mathworks.com/matlabcentral/fileexchange/56190-pwm), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2014b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Measurements and Feature Extraction > Pulse and Transition Metrics >
Find more on Pulse and Transition Metrics in Help Center and MATLAB Answers
Tags
Communities
More Files in the Power Electronics Control Community
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
PWM/
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | Adding of a video demonstration link. |
