MATLAB Answers


Could anyone post a clearly commented code for implementation of Wigner Ville Distribution on any signal.

Asked by Karthiga Mahalingam on 30 Jun 2016
I obtained the following code from net.
It just finds the autocorrelation of a signal and then fourier transforms it.
%WVD compute discrete wigner-ville distribution
% x - analytic signal
% Fs - sampling frequency
[N, xcol] = size(x);
if N<xcol
x = x.';
N = xcol;
WD = zeros(N,N);
t = (1:N)/Fs;
f = (1:N)*Fs/(2*N);
for ti = 1:N
taumax = min([ti-1,N-ti,round(N/2)-1]);
tau = -taumax:taumax;
Rxx(tau-tau(1)+1,ti) = x(ti+tau).*conj(x(ti-tau));
WD = 2.*fft(Rxx);
WD = abs(WD);
However, the above code did not give satisfactory outputs and also the frequency vector is defined rather than obtaining the information from the signal.
I also tried implementing the discrete form of WVD but couldn’t do so since I dint know how to obtain the frequency vector of the signal and the equation needed this information.


Sign in to comment.

0 Answers