* Bug #11670 to 11676 fixed - Add examples in the signal processing help pages.
[scilab.git] / scilab / modules / signal_processing / help / en_US / wigner.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  version="5.0-subset Scilab" xml:lang="en" xml:id="wigner">
3     <refnamediv>
4         <refname>wigner</refname>
5         <refpurpose> 'time-frequency' wigner spectrum</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>[tab]=wigner(x,h,deltat,zp)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>tab</term>
16                 <listitem>
17                     <para>wigner spectrum (lines correspond to the time variable)</para>
18                 </listitem>
19             </varlistentry>
20             <varlistentry>
21                 <term>x</term>
22                 <listitem>
23                     <para>analyzed signal</para>
24                 </listitem>
25             </varlistentry>
26             <varlistentry>
27                 <term>h</term>
28                 <listitem>
29                     <para>data window</para>
30                 </listitem>
31             </varlistentry>
32             <varlistentry>
33                 <term>deltat</term>
34                 <listitem>
35                     <para>analysis time increment (in samples)</para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>zp</term>
40                 <listitem>
41                     <para>
42                         length of FFT's. <literal>%pi/zp</literal> gives the frequency increment.
43                     </para>
44                 </listitem>
45             </varlistentry>
46         </variablelist>
47     </refsection>
48     <refsection>
49         <title>Description</title>
50         <para>
51             function which computes the 'time-frequency' wigner
52             spectrum of a signal.
53         </para>
54     </refsection>
55     <refsection>
56         <title>Sample</title>
57         <scilab:image>
58             a=[488^2 488 1;408^2 408 1;568^2 568 1];
59             b=[1.28;0;0];
60             x=a\b;
61             t=408:568;
62             p=x'*[t.*t;t;ones(t)];
63             u=[0*ones(408:487) ones(488:568)];
64             s=p.*sin(2*%pi/16*t+u*%pi);
65             s=[0*ones(0:407) s 0*ones(569:951)];
66             h=ones(1,64);
67             w=wigner(s,h,12,128);
68             scf();
69             plot3d(1:69,1:64,abs(w(1:69,1:64)));
70         </scilab:image>
71     </refsection>
72     
73     <refsection>
74         <title>Examples</title>
75         <programlisting role="example"><![CDATA[ 
76 a=[488^2 488 1;408^2 408 1;568^2 568 1];
77 b=[1.28;0;0];
78 x=a\b;
79 t=408:568;
80 p=x'*[t.*t;t;ones(t)];
81 // unit step function
82 u=[0*ones(408:487) ones(488:568)];
83 // finite duration sinusoid
84 s=p.*sin(2*%pi/16*t+u*%pi);
85 // signal to be analyzed
86 s=[0*ones(0:407) s 0*ones(569:951)];
87 // 64-point rectangular window
88 h=ones(1,64);
89 // wigner spectrum
90 w=wigner(s,h,12,128);
91 scf();
92 plot3d(1:69,1:64,abs(w(1:69,1:64)));
93  ]]></programlisting>
94     </refsection>
95     
96 </refentry>