% 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{tfrscalo}
\section*{\hspace*{-1.6cm} tfrscalo}

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

{\bf \large \sf Purpose}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
Scalogram, for Morlet or Mexican hat wavelet.
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Synopsis}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
\begin{verbatim}
[tfr,t,f,wt] = tfrscalo(x)
[tfr,t,f,wt] = tfrscalo(x,t)
[tfr,t,f,wt] = tfrscalo(x,t,wave)
[tfr,t,f,wt] = tfrscalo(x,t,wave,fmin,fmax)
[tfr,t,f,wt] = tfrscalo(x,t,wave,fmin,fmax,N)
[tfr,t,f,wt] = tfrscalo(x,t,wave,fmin,fmax,N,trace)
\end{verbatim}
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Description}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
        {\ty tfrscalo} computes the scalogram (squared magnitude of a
        continuous wavelet transform). Its expression is the following\,:
\[SC_x(t,a;h)=\left|T_x(t,a;h)\right|^2=\frac{1}{|a|}\
\left|\int_{-\infty}^{+\infty} x(s)\ h^*\left(\dfrac{s-t}{a}\right)\
ds\right|^2.\] This time-scale expression has an equivalent time-frequecy
expression, obtained using the formal identification $a=\dfrac{\nu_0}{\nu}$,
where $\nu_0$ is the central frequency of the mother wavelet $h(t)$.\\

\hspace*{-.5cm}\begin{tabular*}{14cm}{p{1.5cm} p{8.5cm} c}
Name & Description & Default value\\
\hline
        {\ty x} & signal to be analyzed ({\ty Nx=length(x)}). Its
            analytic version is used ({\ty z=hilbert(real(x))})\\  
        {\ty t} & time instant(s) on which the {\ty tfr} is evaluated & {\ty (1:Nx)}\\
        {\ty wave} & half length of the Morlet analyzing wavelet at coarsest 
            scale. If {\ty wave=0}, the Mexican hat is used
                                                & {\ty sqrt(Nx)}\\
        {\ty fmin, fmax} & respectively lower and upper frequency bounds of 
            the analyzed signal. These parameters fix the equivalent
            frequency bandwidth (expressed in Hz). When unspecified, you
            have to enter them at the command line from the plot of the
            spectrum. {\ty fmin} and {\ty fmax} must be $>${\ty 0} and $\leq${\ty 0.5}\\
        {\ty N} &  number of analyzed voices  & auto\footnote{This value,
	determined from {\ty fmin} and {\ty fmax}, is the 
	next-power-of-two of the minimum value checking the non-overlapping
	condition in the fast Mellin transform.}\\

\hline\end{tabular*}\end{minipage}
\hspace*{1.5cm}\begin{minipage}[t]{13.5cm}
\hspace*{-.5cm}\begin{tabular*}{14cm}{p{1.5cm} p{8.5cm} c}
Name & Description & Default value\\\hline

        {\ty trace} & if nonzero, the progression of the algorithm is shown
                                                & {\ty 0}\\
\hline  {\ty tfr} & time-frequency matrix containing the coefficients of the
            decomposition (abscissa correspond to uniformly sampled time,
            and ordinates correspond to a geometrically sampled
            frequency). First row of {\ty tfr} corresponds to the lowest 
            frequency. \\
        {\ty f} & vector of normalized frequencies (geometrically sampled 
            from {\ty fmin} to {\ty fmax})\\
        {\ty wt} & Complex matrix containing the corresponding wavelet
            transform. The scalogram {\ty tfr} is the squared modulus of {\ty wt}\\

\hline
\end{tabular*}
\vspace*{.2cm}

When called without output arguments, {\ty tfrscalo} runs {\ty tfrqview}.
\end{minipage}
\vspace*{1cm}


{\bf \large \sf Example}
\begin{verbatim}
         sig=altes(64,0.1,0.45); 
         tfrscalo(sig);  
\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] O. Rioul, P. Flandrin ``Time-Scale Distributions : A General Class
Extending Wavelet Transforms'', IEEE Transactions on Signal Processing,
Vol. 40, No. 7, pp. 1746-57, July 1992.
\end{minipage}

