Why is wvd output time vector twice the size of the input
6 views (last 30 days)
Background: I want to demonstrate energy conservation in the Wigner-Ville distribution by comparing the variance of the time signal with the sum of the time marginal of the WVD.
Problem: Looking at the output from the wvd function, I see twice as many time samples as are in the input (and the same goes for the frequencies by the way). I have made a small example code below. Even if the hilbert transform is implicitly applied (which a glance at wvd.m seems to imply - why is this enforced and not an option by the way?) I don't see why this should yield twice the number of time samples in the output. Can anyone explain this behavior?
That being said, energy is conserved despite the difference in number of samples, I just need to normalize by the size of the output. I just find it hard to explain if I don't understand the size of the output...
Hope someone can help clarify.
Thanks in advance.
>> t = 0:0.01:0.99;
>> x = sin(2*pi*30*t);
>> [dOut,fOut,tOut] = wvd(x, 100);
Prachi Kulkarni on 19 Oct 2021
The output time vector tOut of the wvd function is twice the size of the input because the default value for the NumTimePoints argument is 4*ceil(length(x)/2).
Please refer to the following documentation for details about how to change the value of NumTimePoints.