Why does the FWHT function calculate slower than the FFT function, even though the documentation says they use similar algorithms?
5 views (last 30 days)
Show older comments
MathWorks Support Team
on 16 Apr 2018
Answered: MathWorks Support Team
on 16 Apr 2018
I am using the FFT and the FWHT function. I was expecting them to take around the same time to compute since the documentation page for FWHT says, "The fast Walsh-Hadamard transform algorithm is similar to the Cooley-Tukey algorithm used for the FFT. Both use a butterfly structure to determine the transform coefficients."
Instead, I have found that it only takes 0.5 seconds to calculate the FFT of my matrix, whereas it takes 5 seconds to calculate the FWHT of my matrix. What is causing this difference in performance?
Accepted Answer
MathWorks Support Team
on 11 Feb 2020
FWHT does not use a third party library, and instead is calculated using for loops, which causes slower calculation speeds. To see the FWHT algorithm implementation in MATLAB, run the following command in the MATLAB command window to open the function's M-file:
>> edit fwht
0 Comments
More Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!