我想绘制一个函数图,该函数的超调量为 25%,然后在 100% 时稳定下来并出现细微振荡。我想在列出的某个软件包中创建它,或者在 gnus 情况下添加到 PGFPlots 中。不幸的是,我不知道该函数,我只有一张图片,所以我不知道如何开始创建它。
答案1
仅作为起点。这不是完整的答案。
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-plot}
\pstVerb
{
/xi .125 def
/tau .25 def
/rho {xi 2 exp neg 1 add sqrt} def
/amp 3 def
}
\def\f(#1){amp*(1-3^(-xi*(#1)/tau)*(cos((#1)*rho/tau)+sin((#1)*rho/tau)*xi/rho))}
\begin{document}
\begin{pspicture}[plotpoints=300](-1,-1)(11,7)
\psaxes[labels=none,ticks=none]{->}(0,0)(-1,-1)(10.5,6.5)[$t$,0][$v(t)$,90]
\psplot[algebraic,linecolor=blue,linewidth=2pt]{0}{10}{\f(x)}
\end{pspicture}
\end{document}
答案2
因此我能够制作以下内容:
\documentclass[tikz, convert = false]{standalone}
\usepackage[utf8]{inputenx}% http://ctan.org/pkg/inputenx
% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt
\renewcommand{\rmdefault}{ppl}% rm
\linespread{1.05}% Palatino needs more leading
\usepackage[scaled]{helvet}% ss // http://ctan.org/pkg/helvet
\usepackage{courier}% tt // http://ctan.org/pkg/courier
\usepackage{eulervm} % http://ctan.org/pkg/eulervm
% a better implementation of the euler package (not in gwTeX)
\normalfont%
\usepackage[T1]{fontenc}% http://ctan.org/pkg/fontenc
\usepackage{textcomp}% http://ctan.org/pkg/textcomp
\usepackage{pgfplots}
\pgfplotsset{compat = 1.9}
\pgfmathsetmacro\z{0.403713}
\pgfmathsetmacro\w{343.386319715305}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ymax = 1.3,
ymin = 0,
xmin = 0,
xmax = .05,
ytick = {0, 1.25},
xtick = {0, 0.01},
axis x line = center,
axis y line = left,
xlabel = {$t(sec)$},
ylabel = {$y(t)$}
]
\addplot[blue, samples = 100, smooth]
gnuplot[id = exp, domain = 0:.05]
{1 - exp(-\z*\w*x)/sqrt(1 - \z^2)*sin(\w*x*sqrt(1 - \z^2) + 1/cos(\z))};
\end{axis}
\end{tikzpicture}
\end{document}
我怎样才能将其更改1*10^{-2}
为显示为 0.01?