Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{amsmath}
- usepackage{tikz}
- %usepgfplotslibrary{external} %use with --shell-escape
- %tikzexternalize[prefix=Tikzplots/]
- %pgfplotsset{compat=newest}
- makeatletter %vdots without extra space on top
- DeclareRobustCommand{rvdots}{%
- vbox{
- baselineskip4p@lineskiplimitz@
- kern-p@
- hbox{.}hbox{.}hbox{.}
- }}
- makeatother
- newcommandtikzmark[1]{% %nodes in matrix for lines
- tikz[overlay,remember picture,baseline] node [anchor=base] (#1) {};}
- newcommandMyLine[3][]{% %draw lines between the nodes^
- begin{tikzpicture}[overlay,remember picture]
- draw[#1] (#2.north west) -- (#3.east);
- end{tikzpicture}}
- begin{document}
- [
- begin{bmatrix}
- Y[1]\
- phantom{0}\
- rvdots\
- rvdots\
- phantom{0}\
- Y[k]
- end{bmatrix}
- =
- begin{bmatrix}
- phantom{0}tikzmark{a} & phantom{0}& phantom{0}& phantom{0}&phantom{0}& phantom{0} \
- \
- \
- \
- \
- & & & & & tikzmark{b}phantom{0}
- end{bmatrix}
- cdot
- begin{bmatrix}
- X[1]\
- phantom{0}\
- rvdots\
- rvdots\
- phantom{0}\
- X[k]
- end{bmatrix}
- ]
- [
- begin{bmatrix}
- Y[1]\
- phantom{0}\
- rvdots\
- rvdots\
- phantom{0}\
- Y[k]
- end{bmatrix}
- =
- begin{bmatrix}
- phantom{0}tikzmark{c} & phantom{0} &phantom{0}tikzmark{e} &phantom{0} & phantom{0}tikzmark{g}& phantom{0}\
- & & & & &tikzmark{h}phantom{0}\
- phantom{0}tikzmark{i}& & & & &\
- & & & & & tikzmark{f}phantom{0} \
- phantom{0}tikzmark{k}& & & & &\
- &tikzmark{l}phantom{0} & &tikzmark{j}phantom{0} & & tikzmark{d}phantom{0}\
- end{bmatrix}
- cdot
- begin{bmatrix}
- X[1]\
- phantom{0}\
- rvdots\
- rvdots\
- phantom{0}\
- X[k]
- end{bmatrix}
- ]
- MyLine[thick]{a}{b}
- MyLine[red,thick]{c}{d}
- MyLine[thick]{e}{f}
- MyLine[thick]{g}{h}
- MyLine[thick]{i}{j}
- MyLine[thick]{k}{l}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement