Tuesday, October 22, 2013

QR factorization latex

%!TEX encoding = UTF-8 Unicode
% Author: Abhijith
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}


\usetikzlibrary[positioning]
\usetikzlibrary{patterns}
\usepackage[french]{babel}

\begin{document}
\begin{tikzpicture}

\pgfmathsetmacro\x{3}    
\pgfmathsetmacro\y{11}
\filldraw[fill=blue!20] (1,1) rectangle +(\x,\y);
\draw[thin] (1,1) rectangle +(\x,\y);
\node[above] at (.5*\x + 1,\y + 1){$A$};
\draw [thick,|-] (0,12) -- (0,7);
\node[below] at (0,7){$m$};
\draw [thick,-|] (0,6.5) -- (0,1);
\draw [thick,|-] (1,0) -- (2.25,0);
\node[right] at (2.25,0){$n$};
\draw [thick,-|] (2.75,0) -- (4,0);

% X=5
\node[above] at (\x + 2,.5*\y +1){$\boldmath{=}$};

%X=6
\draw [thick,|-] (6,12) -- (6,7);
\node[below] at (6,7){$m$};
\draw [thick,-|] (6,6.5) -- (6,1);
%X=7
\filldraw[fill=blue!20] (7,1) rectangle +(\x,\y);
\draw[thin] (7,1) rectangle +(\x,\y);
\node[above] at (.5*\x + 7,\y + 1){$Q$};
\draw [thick,|-] (7,0) -- (7.9,0);
\node[right] at (7.9,0){$k\leq n$};
\draw [thick,->] (9.1,0) -- (10,0);

%X=11
\draw [thick,|-] (11,12) -- (11,10.8);
\node[below] at (11,10.8){$k\leq n$};
\draw [thick,->] (11,10.2) -- (11,9);

%X=12
\draw[thin] (12,9) rectangle +(\x,\x);
\node[above] at (.5*\x + 12,\y + 1 ){$R$};
\draw [thick,|-] (12,8) -- (13.25,8);
\node[right] at (13.25,8){$n$};
\draw [thick,-|] (13.75,8) -- (15,8);
\draw[fill=blue!20] (15,9) -- (15,12) -- (12,12) -- (15,9);


\end{tikzpicture}

\end{document}



No comments:

Post a Comment