Why is wvd output time vector twice the size of the input

12 views (last 30 days)
Dear community,
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.
Best, Jacob
>> t = 0:0.01:0.99;
>> x = sin(2*pi*30*t);
>> [dOut,fOut,tOut] = wvd(x, 100);
>> size(t)
ans =
1 100
>> size(tOut)
ans =
200 1

Answers (1)

Prachi Kulkarni
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.
Prachi Kulkarni
Prachi Kulkarni on 27 Oct 2021
According to the theory, the WVD is the Fourier transform of the instantaneous autocorrelation of the signal. The instantaneous autocorrelation can be non-zero as long as the signal can overlap with itself. Hence, as per theory, the length of the output time vector is twice the length of the input time vector.
In the smoothed pseudo WVD, the length of the window is varied to give more weightage to neighbouring time points. Hence, the number of time points can be varied for the smoothed pseudo WVD.
Please refer to the references given at the bottom of the wvd documentation for the relevant theory.

Sign in to comment.


Find more on Time-Frequency Analysis 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!

Translated by