triangleWave( time, amplitude, waveL, phaseShift)
Version 1.0.0.0 (290 Bytes) by
Pontus Fyhr
Generate triangle waves at any time amplitude wavelength and phase shifts
A function to generate triangle waves over an array of time samples, used for example in sinusoidal PWM.
Fulfills some additional desireable traits over the original inspiration: mathworks.com/matlabcentral/fileexchange/46987-generation-of-triangle-wave
This allows you to change the amplitude, wavelength and phase shift.
Cite As
Pontus Fyhr (2026). triangleWave( time, amplitude, waveL, phaseShift) (https://in.mathworks.com/matlabcentral/fileexchange/65559-trianglewave-time-amplitude-wavel-phaseshift), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2015b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Signal Generation, Analysis, and Preprocessing > Waveform Generation >
Find more on Waveform Generation in Help Center and MATLAB Answers
Tags
Acknowledgements
Inspired by: Generation of triangle wave
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.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | Spelling and link
|
