1D Walsh Transform
This function generates a Walsh-Matrix which can be used to perform the 1D-Walsh transform on a vector:
Example:
>> walsh(4)*[1 2 3 4]'
The returned matrix is internally cached within the function (persistent) which implies that it is efficient to call the function in a loop as long as the arguments passed remain the same.
The transform is faster than other (loop-) implementations found here on the File Exchange since the loop induces a lot of overhead.
This file is actually just part of my 2D-Walsh-Transform file submission (ID 20312).
Type "help walsh" for help.
>> help walsh
WALSH Hadamard matrix.
WALSH(N) is a Walsh matrix of order N, that is,
a matrix W with elements 1 or -1 such that W'*W = N*EYE(N).
An N-by-N Walsh matrix with N > 2.
This function handles only the cases where N is a power of 2.
The function internally cashes the generated matrix so that
it is efficient to call this function multiple times if the
passed parameters remain the same among the calls.
WALSH(N,CLASSNAME) produces a matrix of class CLASSNAME.
CLASSNAME must be either 'single' or 'double' (the default).
Cite As
Andre (2024). 1D Walsh Transform (https://www.mathworks.com/matlabcentral/fileexchange/20500-1d-walsh-transform), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Transforms, Correlation, and Modeling > Transforms > Hilbert and Walsh-Hadamard Transforms >
Tags
Acknowledgements
Inspired by: Faster 2D-Hadmard Tranform
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 |