Square Wave Transform Tool
The MATLAB® command described here performs a time series analysis using the Square Wave Transform (SWT) and is accessible from the MATLAB interface under the name swt .
The outputs are a two-column matrix S , and a single numerical value that indicates the approximation quality, referred to as Dm . The matrix S will have a row for each data value in the input data set, in which the value in the first column correspond to the square wave frequency (fi in the published paper) and the value in the second column corresponds to the square wave coefficient (Ci in the published paper).
swt is a user-defined function that requires three parameters to work properly. The first parameter V corresponds to the time series to be analyzed, input as a standard MATLAB vector. The second parameter f corresponds to the sampling frequency in Hz of the data in parameter V . Finally, the third parameter Dt corresponds to the time interval in seconds of the entire data set.
Reference
Skliar O., Monge R. E., Oviedo G. and Gapper S. (2016). A New Method for the Analysis of Signals: The Square Wave Transform, Revista de Matemática. Teoría y aplicaciones 2016, Vol. 23(1), pp. 85-110.
GitHub Repository
https://github.com/AppliedMathGroup/SignalImageAnalysis/tree/master/SWT
Cite As
Ricardo Monge (2026). Square Wave Transform Tool (https://www.mathworks.com/matlabcentral/fileexchange/57644-square-wave-transform-tool), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Computer Vision Toolbox > Recognition, Object Detection, and Semantic Segmentation > Image Category Classification >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
