Escolar Documentos
Profissional Documentos
Cultura Documentos
Example 1:
Code: \xymatrix{*-=[o]{\circ}\ar[r] & *+[F]{P}\ar@{-}[r] & *+[.][F]{}\ar[d]\\*+[.][F]{}\ar[u] & *+[F]{C}\ar[l]
& *+[.][F]{}\ar[l]\ar@(dl,dr)[ll]}
Result:
/
O
_o
Example 2:
Code: \xymatrix{*-=[o]{\circ}\ar[r] & *+[F]{P}\ar[r] & *+[.][F]{}\ar[d]\\*+[.][F]{}\ar[u]^{-} & *+[F]{C}\ar[l]
& *+[.][F]{}\ar[l]}
Result:
O
Troubles in LYX: The label is troublsome when I want to customize its locations. E.g., I want to get
O
o
1
which, when put in the what-you-see-is-what-you-get LYX environment (with the command ctrl+m), gives you
the following:
O
o
However, in the ctrl+l environment in LYX there is no such error.
pst-sigsys stands for (my personal interpretation) additional PSTricks for signal processing.
Pros:
commands are more meaningful and easier to remember
the figures are prettier
much easier in node connections
Cons: it does not support pdflatex. I need to compile to dvi first, and then use ps2pdf.
Useful commands:
Nodes:
\pnode(x,y){name}: put a zero dimentional node at (x,y)
\rnode[refpoint]{name}{stuff}: put stuff in a box, centered at refpoint
\cnode(x,y){radius}{name}: draw a circle node
Node connections (nc):
\ncline{arrows}{starting name}{ending name}, where arrows can take the values: ->, <-, -, ...
\begin{pspicture}(6,2): the frame of the pic is a 6 by 2 rectangle
Node labeling:
\ncput[npos = 0.9]{-}: node connection, put label on the line, at 90% of the length, the stuff to put
is -
\baput[]{}: put above the line
\bbput[]{}: put below the line
Example 1:
Codes:
\begin{pspicture}(6,2)
\rput(0,1){\rnode{x}{$x[n]$}}
%\psfblock[framesize =0.75 0.5](2,1){a}{$H_1$}
%\psfblock[framesize =1.5 1](4,1){b}{$H_2$}
\psblock(1.5,1){a}{$H_1$}
\psblock(3,1){b}{$H_2$}
\rput(6,1){\rnode{y}{$y[n]$}}
%
\psset{style = Arrow }
\ncline[nodesepA =.15]{x}{a}
\ncline{a}{b}
\ncline[nodesepB =.15]{b}{y}
\end{pspicture}
2
Result:
[]
[]
1 []
1 ()
[]
2 ()
1 []
[]
2 []
2 ()
( 1 )
1 ()
( 1 )
++ ( 1 ) ()
(1 ) ( 1 )
( 1 )
tikz
Compared to pst-sigsys, this one is more convenient for me since it supports pdflatex directly.
Example codes from http://www.texample.net/tikz/examples/control-system-principles/
\tikzstyle{block} = [draw, rectangle, minimum height=2em, minimum width=4em] %fill=blue!20
\tikzstyle{sum} = [draw, fill=blue!20, circle, node distance=1cm]
\tikzstyle{input} = [coordinate] \tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]
\begin{tikzpicture}[auto, node distance=2cm,>=latex]
\node [input, name=input] {};
3
()
( 1 )
()
( 1 )
()
( 1 )
()