title: To scale values from Wigner-Ville Distribution to real range in Matlab
body: <p>I run by using the function tfrwv.m in <a href="http://tftb.nongnu.org/" rel="nofollow noreferrer">Time-Frequency Toolbox</a></p>
  
  <pre><code>[B,T,F] = tfrwv(data, 1:length(data), length(data), 1);
  B(1:130, :) = 0;    % remove the duplicate part of the distribution
  imagesc(T, F, abs(B));
  colormap(hot);
  xlabel('t [s]');
  ylabel('f [Hz]');
  </code></pre>
  
  <p>I get</p>
  
  <p><img src="https://i.stack.imgur.com/oOEPr.png" alt="enter image description here"></p>
  
  <p>The frequency should be within [0,180] Hz and time [0,2.5s].</p>
  
  <p><strong>How can you scale time and frequency to the real values?</strong></p>
  
  <p>The manuals says</p>
  
  <pre><code>%TFRWV  Wigner-Ville time-frequency distribution.
  %   [TFR,T,F]=TFRWV(X,T,N,TRACE) computes the Wigner-Ville distribution
  %   of a discrete-time signal X, 
  %   or the cross Wigner-Ville representation between two signals. 
  % 
  %   X     : signal if auto-WV, or [X1,X2] if cross-WV.
  %   T     : time instant(s)          (default : 1:length(X)).
  %   N     : number of frequency bins (default : length(X)).
  %   TRACE : if nonzero, the progression of the algorithm is shown
  %                                    (default : 0).
  %   TFR   : time-frequency representation. When called without 
  %           output arguments, TFRWV runs TFRQVIEW.
  %   F     : vector of normalized frequencies.
  %
  %   Example :
  %    sig=fmlin(128,0.1,0.4); tfrwv(sig);
  % 
  </code></pre>
  
  <p>and I Run</p>
  
  <pre><code>[B,T,F] = tfrwv(data, 1:length(data), length(data), hamming(length(data)/10), hamming(length(data)/4));
  </code></pre>
  
  <p>and I get</p>
  
  <pre><code>Error using tfrwv
  Too many input arguments.
  
  Error in flow_wv (line 8)
      [B,T,F] = tfrwv(data, 1:length(data), length(data),
      hamming(length(data)/10), hamming(length(data)/4));
  </code></pre>
  
  <p>I think the problem here is initialising the windows for time and frequency.
  I am trying to manipulate the both axis, by editing the values of the parameters.</p>
  
  <p>A corresponding Spectrogram of the same data but with axis of right labels is, done by Matlab's default spectrogram function, discussion <a href="https://stackoverflow.com/questions/20748139/to-scale-values-from-matlabs-spectrogram-to-real-range">here</a>:</p>
  
  <p><img src="https://i.stack.imgur.com/4isQw.png" alt="enter image description here"></p>