[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tftb-help] Question about TF representations as images
From: |
Jaidev Deshpande |
Subject: |
[Tftb-help] Question about TF representations as images |
Date: |
Thu, 11 Oct 2012 02:35:12 +0530 |
Hello,
I was going through the toolbox and I found that in order to obtain a
graphical time-frequency representation of a signal, a fairly uniform
procedure is followed. In many cases it consists of constructing a TFR
matrix and then passing the matrix to another script to render it as a
image, etc.
Here's a piece of code that I came across very often in the tfr*.m
files. (This one is form tfrwv.m)
for icol=1:tcol,
% for every instance of time
ti= t(icol);
% ti is the time instance
taumax=min([ti-1,xrow-ti,round(N/2)-1]);
% What is taumax?
tau=-taumax:taumax; indices= rem(N+tau,N)+1;
% Why are we interested only in the indices in the 'indices' variable?
Windowing the input, maybe?
tfr(indices,icol) = x(ti+tau,1) .* conj(x(ti-tau,xcol));
% Product in the neighbourhood of -tau:tau
tau=round(N/2);
% Why this step?
if (ti<=xrow-tau)&(ti>=tau+1),
tfr(tau+1,icol) = 0.5 * (x(ti+tau,1) * conj(x(ti-tau,xcol)) + ...
x(ti-tau,1) * conj(x(ti+tau,xcol))) ;
I'd be grateful if someone could walk me through this code, step by
step. I notice that this is script is common to most TFR scripts in
the toolbox, with minor modifications. I'm not getting what exactly it
does. I'm particularly interested in answering the questions, "Given a
signal f and a TFR method like STFT or WVD, how do you make the TFR
matrix?" If you can point me to a basic tutorial, that would be great
too.
Thanks
- [Tftb-help] Question about TF representations as images,
Jaidev Deshpande <=