(texdraw)Filter response graph


Next: Geometric construction Prev: Block diagram Up: Examples
Enter node , (file) or (file)node

C.2 Filter response graph
=========================

This example shows the response of a canonical filter.  TeXdraw is not
well suited for general purpose graphing -- it has no coordinate
translation facility nor does it have separate X and Y scaling.
Nonetheless, for certain simple graphs, TeXdraw is adequate.

   In this example, macro '\ticklab' places a labelled axis tick at a
given position.  The data is specified in a straightforward manner,
having been scaled beforehand to give the desired aspect ratio for the
graph.

     \centertexdraw{
     \arrowheadtype t:F  \arrowheadsize l:0.08 w:0.04
     \def\ds {\displaystyle}
     \def\ticklab (#1 #2)#3{\move(#1 #2)
                            \bsegment
                              \lvec (0 0.05)
                              \textref h:C v:T \htext (0 -0.05){#3}
                            \esegment}
     \def\Rtext #1{\bsegment
                     \textref h:L v:C \htext (+0.08 0){#1}
                   \esegment}

     \move (2.4 -0.3)    % move to set the size

     \move (0 0)
     % Axes
     \avec (0 +1.4)
     \move (0 0) \avec (2.2 0) \Rtext{$\omega$}
     \ticklab (0 0)   {0}
     \ticklab (0.8 0) {$\ds {\pi \over 2N} $}
     \ticklab (1.2 0) {$\omega_s$}
     \ticklab (1.6 0) {$\ds {\pi \over N} $}

     \linewd 0.025
     \move (0 1)
     \lvec (0.4 1)
     \lvec (0.44 0.998)
     \lvec (0.48 0.988)
     \lvec (0.52 0.973)
     \lvec (0.56 0.951)
      ...
     \lvec (1.08 0.233)
     \lvec (1.12 0.156)
     \lvec (1.16 0.078)
     \lvec (1.20 0)
     \lvec (1.9 0)
     }


automatically generated by info2www version 1.2.2.9