% This is part of the TFTB Reference Manual.
% Copyright (C) 1996 CNRS (France) and Rice University (US).
% See the file refguide.tex for copying conditions.


\markright{tfrrsp}
\section*{\hspace*{-1.6cm} tfrrsp}

\vspace*{-.4cm}
\hspace*{-1.6cm}\rule[0in]{16.5cm}{.02cm}
\vspace*{.2cm}

{\bf \large \sf Purpose}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
Reassigned Spectrogram.
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Synopsis}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
\begin{verbatim}
[tfr,rtfr,hat] = tfrrsp(x) 
[tfr,rtfr,hat] = tfrrsp(x,t) 
[tfr,rtfr,hat] = tfrrsp(x,t,N) 
[tfr,rtfr,hat] = tfrrsp(x,t,N,h) 
[tfr,rtfr,hat] = tfrrsp(x,t,N,h,trace) 
\end{verbatim}
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Description}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
        {\ty tfrrsp} computes the spectrogram and its reassigned version.
 The reassigned spectrogram is given by the following expression\,:
\begin{eqnarray*}
\hspace*{-.5cm}S_x^{(r)}(t',\nu';h)=\iint_{-\infty}^{+\infty} S_x(t,\nu;h)\
\delta(t'-\hat{t}(x;t,\nu))\ \delta(\nu'-\hat{\nu}(x;t,\nu))\ dt\ d\nu,
\end{eqnarray*}
where 
\begin{eqnarray*}
\hat{t}(x;t,\nu)=t-\Re\left\{\dfrac{F_x(t,\nu;\ens{T}_h)\ F_x^*(t,\nu;h)}
{|F_x(t,\nu;h)|^2}\right\} \\
\hat{\nu}(x;t,\nu)=\nu+\Im\left\{\dfrac{F_x(t,\nu;\ens{D}_h)\ F_x^*(t,\nu;h)}
{2\pi\ |F_x(t,\nu;h)|^2}\right\}    
\end{eqnarray*}
with $\ens{T}_h(t)=t\ h(t)$ and $\ens{D}_h(t)=\frac{dh}{dt}(t)$.\\

\hspace*{-.5cm}\begin{tabular*}{14cm}{p{1.5cm} p{8cm} c}
Name & Description & Default value\\
\hline
        {\ty x}     & analyzed signal ({\ty Nx=length(x)})\\
        {\ty t}     & the time instant(s)      & {\ty (1:Nx)}\\
        {\ty N}     & number of frequency bins & {\ty Nx}\\
        {\ty h}     & frequency smoothing window, {\ty h(0)} being forced to {\ty 1}
                                         & {\ty window(odd(N/4))}\\
        {\ty trace} & if nonzero, the progression of the algorithm is shown
                                         & {\ty 0}\\
     \hline {\ty tfr, rtfr} & time-frequency representation and its reassigned
            version\\
        {\ty hat}   & complex matrix of the reassignment vectors\\
 
\hline
\end{tabular*}
\vspace*{.2cm}

When called without output arguments, {\ty tfrrsp} runs {\ty tfrqview}.
\end{minipage}

%\newpage

{\bf \large \sf Example}
\begin{verbatim}
         sig=fmlin(128,0.1,0.4); 
         h=window(17,'Kaiser'); 
         tfrrsp(sig,1:128,64,h,1);
\end{verbatim}
\vspace*{.5cm}

{\bf \large \sf See Also}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
all the {\ty tfr*} functions.
\end{minipage}
\vspace*{.5cm}


{\bf \large \sf Reference}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
[1] F. Auger, P. Flandrin ``Improving the Readability of Time-Frequency and
Time-Scale Representations by the Reassignment Method'' IEEE Transactions
on Signal Processing, Vol. 43, No. 5, pp. 1068-89, 1995.
\end{minipage}

