带部分主元的高斯消元法

带部分主元的高斯消元法

我想要绘制下图。我必须在 Latex 中做什么?

有没有像 LaTable 这样的编辑器来设计这个图形?

在此处输入图片描述

答案1

只是为了好玩,左图。

我希望您尝试理解注释的代码。

\documentclass[tikz,border=2mm]{standalone} 
\usetikzlibrary{positioning, patterns, arrows.meta, bending}
\usepackage{mathtools}
\usepackage{lmodern}

\begin{document}
\begin{tikzpicture}[>={Stealth[bend, length=5pt]}]

%Outer square
\node[minimum size=2cm, draw, inner sep=0pt, outer sep=0pt] (A) {};

%Dashed square
\node[minimum size=1cm, draw, pattern = north west lines, draw, anchor=north west, inner sep=0pt, outer sep=0pt] (a) {};

%North trapezium
\filldraw[fill=blue!15, line join=bevel] (A.north west)-|(a.north east)--(a.north west)--cycle;

%blue vertical line and label
\draw[line width=2mm, blue!30] (a.north west)--(a.south west) node[below, black]{$k$};

%two white little squares
\node[draw, fill=white, minimum size=2mm, inner sep=0pt, outer sep=0pt] at (a.north west)(b1) {};

\node[draw, fill=white, minimum size=2mm, inner sep=0pt, outer sep=0pt] at ([yshift=-7mm]a.north west) (b2) {};

%dashed lines and labels
\draw[dashed] (b1)--(b1-|A.west) node [left] (k) {$k$};

\draw[dashed] (b2)--(b2-|A.west) node [left] (r) {$\overline{r}$};

%Big 0 at dashed lines area center
\path (k)-- node[font=\Large] {$0$} (b2);

%Curved line
\path (k.west) edge[<->, bend right=45] (r.west);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容