История изменений
Исправление
dikiy,
(текущая версия)
:
А я как-то один график два дня делал :)
И пришлось таки точки в gnuplot генерировать, так как вменяемого метода делать графики типа «пилы» в tikz я так и не нашел.
\tikzset{
%declare function={
% sign(\x)=(and(\x<0,1)* -1)+(and(\x>0,1)*1);
%}
%}
\begin{tikzpicture}
\def \x0{0.4};
\def\T{-0.5*ln(1-2*\x0)};
\def\n{0.05};
\def\periode{1.223};
\def\Tplusdt{0.971};
\begin{axis}[axis y line = left, axis x line = center, xmin = 0, xmax=2.05,ymin=-0.1,ymax=0.5, ymajorgrids, x=4.2cm, y=4cm, xlabel=$t$, ylabel=$x_n(t)$, xtick={1,2,3}, extra x ticks = {0.805}, extra x tick labels ={$T$},
x label style={anchor=west}, legend cell align = left
]
% \addplot coordinates (0,0)--(1,1)
\addplot [mark=, thick, densely dashed] table {plot-data-minimal-folge.mat};
\addplot [mark=, thick] table {plot-data-minimal-folge-dicht.mat};
\legend{$n=6$, $n=18$};
\addplot[<->] coordinates {(0.805,0.4) (\periode,0.4)};
\node at (axis cs:0.95,0.45) {$\Delta_6$};
\addplot[dashed] coordinates {(\periode,0.45) (\periode,0)};
\addplot[dashed] coordinates {(0.805,0.45) (0.805,0)};
\addplot[dashed] coordinates {(\Tplusdt,0.3) (\Tplusdt,0)};
\addplot[<->] coordinates {(0.805,0.25) (\Tplusdt,0.25)};
\node[above] at (axis cs:0.9,0.25) {$\delta_6$};
% \addplot [mark=, very thick] plot[variable=\t,domain=0:\T] (\t,{(\x0-0.5)*exp(2*\t)+0.5});
% \foreach \i in {0,...,0}
% \addplot [mark=, very thick] plot[variable=\t,domain=0:2.15,samples=2.15/\n+1] (\t+\T,{\n*((mod(\t,\n)/\n-0.5)*(-1)^floor(\t/\n)+0.5)});
% \addplot coordinates {(0,0) (3,0)};
% \addplot [mark=, very thick] coordinates {(0.8,0) (1,0)};
\end{axis}
Исправление
dikiy,
:
А я как-то один график два дня делал :)
\tikzset{
%declare function={
% sign(\x)=(and(\x<0,1)* -1)+(and(\x>0,1)*1);
%}
%}
\begin{tikzpicture}
\def \x0{0.4};
\def\T{-0.5*ln(1-2*\x0)};
\def\n{0.05};
\def\periode{1.223};
\def\Tplusdt{0.971};
\begin{axis}[axis y line = left, axis x line = center, xmin = 0, xmax=2.05,ymin=-0.1,ymax=0.5, ymajorgrids, x=4.2cm, y=4cm, xlabel=$t$, ylabel=$x_n(t)$, xtick={1,2,3}, extra x ticks = {0.805}, extra x tick labels ={$T$},
x label style={anchor=west}, legend cell align = left
]
% \addplot coordinates (0,0)--(1,1)
\addplot [mark=, thick, densely dashed] table {plot-data-minimal-folge.mat};
\addplot [mark=, thick] table {plot-data-minimal-folge-dicht.mat};
\legend{$n=6$, $n=18$};
\addplot[<->] coordinates {(0.805,0.4) (\periode,0.4)};
\node at (axis cs:0.95,0.45) {$\Delta_6$};
\addplot[dashed] coordinates {(\periode,0.45) (\periode,0)};
\addplot[dashed] coordinates {(0.805,0.45) (0.805,0)};
\addplot[dashed] coordinates {(\Tplusdt,0.3) (\Tplusdt,0)};
\addplot[<->] coordinates {(0.805,0.25) (\Tplusdt,0.25)};
\node[above] at (axis cs:0.9,0.25) {$\delta_6$};
\end{axis}
Исходная версия
dikiy,
:
А я как-то один график два дня делал :)