Square Wave Transform Tool

Tool to compute the Square Wave Transform of a given time series.
72 Downloads
Updated 12 Jun 2016

View License

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
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0