Tikz 误差中的函数乘法图

Tikz 误差中的函数乘法图

我正在尝试使用 tikz 绘制这个函数绘制的图形是不正确的,这是否意味着我不能使用 Tikz 来绘制函数乘法

\documentclass[border=5pt]{standalone}
\usepackage{sansmath}
\usepackage{tikz,pgfplots}     
\usetikzlibrary{angles, arrows.meta,    % new
                quotes}                 % new
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
   \usepackage{amsmath,amsthm, amssymb, latexsym}
%ENEC250071

\begin{document}

    \begin{tikzpicture}[scale=0.5]
\begin{axis}[
    width=15cm,
    axis lines=middle,
    grid=both,
    minor tick num=8,
    grid style={line width=.1pt, draw=gray!10},
    major grid style={line width=.5pt,draw=gray!50},
    enlargelimits={abs=0.2},
    xmin = 0, xmax = 8,
    ymin = 0, ymax = 4,
    xtick={0,0.5,...,8},
     x label style={at={(axis description cs:0.5,-0.01)},anchor=north},
    y label style={at={(axis description cs:-0.02,.5)},rotate=90,anchor=south},
    xlabel={$t(s)$},
    ylabel={$i(t) $ A}
%     x tick label style={font=\small, rotate=45, anchor=east,
%                        /pgf/number format/precision=3}
            ]
     
            
    \addplot[domain=0:8,samples=50,smooth,lava, thick] {(0.5039)*exp(-x/2)*sin(3.9686*x)};
\end{axis}
    \end{tikzpicture}
    \end{document}

相关内容