本文会根据我遇到的新的例子而更新

函数类

  1. 函数$f(t)= \pi \frac{\sin \pi(t-2)}{\pi (t -2)}$
\begin{tikzpicture}[domain=-2.5:7.5, x=0.8cm, y=1cm]
  % 坐标轴绘制(同上)
  \draw[->] (-3,0) -- (8,0) node[right] {$t$};
  \draw[->] (0,-1) -- (0,4) node[above] {$Sa(t)$};
  \node at (0,0) [below left] {$O$};

  % 函数图像
  \draw[color=blue, smooth, samples=200] plot (\x,{3.14159 * sin(3.14159 * (\x - 2) r) / (3.14159 * (\x - 2))});

  % 标注y轴坐标
   \fill[red] (0,3.14159) circle (1pt); % 绿色实心圆点标记
   \node[left, font=\small] at (0,3.14159) {$\pi$}; % 在左侧标注坐标

  % x轴上的零点标注
  \foreach \k in {-1, 1 , 2 , 3 , 4 , 5} {
    \pgfmathsetmacro{\xvalue}{\k}
    \fill[red] (\xvalue,0) circle (1pt);
    \node[below, font=\small] at (\xvalue,-0.2) {$\k$};
  }

  % 只画关键点的垂线
  \draw[dashed] (0,3.14159) -- (2,3.14159); % y轴到顶点
  \draw[dashed] (2,3.14159) -- (2,0);       % 顶点到x轴
 
\end{tikzpicture}

34554532345653.png

  1. 函数$Sa(t) = {\sin t \over t}$
\begin{tikzpicture}[domain=-16:16, x=0.2cm, y=2cm]
  % 坐标轴绘制(同上)
  \draw[->] (-15.7,0) -- (17,0) node[right] {$t$};
  \draw[->] (0,-0.5) -- (0,1.3) node[above] {$Sa(t)$};
  \node at (0,0) [below left] {$O$};

  % 函数图像
  \draw[color=blue, smooth, samples=200] plot (\x,{sin(\x r) / \x});

  % 标注y轴坐标
   \fill[red] (0,1) circle (1pt); % 绿色实心圆点标记
  \node[left, font=\small] at (0,1) {$1$}; % 在左侧标注坐标

  % 交替标注交点位置(避免重叠)
  \foreach \k in {-4,-3,-2,-1,1,2,3,4} {
    \pgfmathsetmacro{\xvalue}{\k * 3.14159}
    \fill[red] (\xvalue,0) circle (1pt);

    % 奇偶交替标注位置
    \ifodd\k
      \node[above, font=\small] at (\xvalue,0.1) {$\k\pi$}; % 奇数在上方
    \else
      \node[below, font=\small] at (\xvalue,-0.1) {$\k\pi$}; % 偶数在下方
    \fi
  }
\end{tikzpicture}

56787762345567.png

  1. 绘制分段函数
% 定义样式
\tikzset{
    elegant/.style={smooth, thick, samples=50}, % 函数曲线样式
    eaxis/.style={->, >=stealth} % 坐标轴样式
}
\begin{tikzpicture}
    % 绘制坐标轴
    \draw[eaxis] (-0.5,0) -- (5,0) node[below] {$t$};
    \draw[eaxis] (0,-2.5) -- (0,2.5) node[above] {$f(t)$};
    \node at (0,0) [below left] {$O$};

    \draw[elegant, domain=0:2] plot (\x, {\x}); 
    \draw[elegant] (2,2) -- (4,2);
    \draw[elegant] (4,2) -- (4,0);

    \foreach \k in {1,2,3,4} {
    \pgfmathsetmacro{\xvalue}{\k}
    \fill (\xvalue,0) circle (1pt);
    \node[below, font=\small] at (\xvalue,-0.2) {$\k$};}

    \fill (0,1) circle (1pt); 
    \node[left, font=\small] at (0,1) {$1$};

\end{tikzpicture}

234567.png

两函数交集区阴影

% 定义样式
\tikzset{
    elegant/.style={smooth, thick, samples=50}, % 函数曲线样式
    eaxis/.style={->, >=stealth} % 坐标轴样式
}
\begin{tikzpicture}
    % 绘制坐标轴
    \draw[eaxis] (-0.5,0) -- (5.5,0) node[below] {$t$};
    \draw[eaxis] (0,-0.5) -- (0,4) node[above] {$s(t)$};
    \node at (0,0) [below left] {$O$};

    \draw[elegant , fill = gray!20] (1.5,0) rectangle (3,3);
    \draw[elegant , draw = blue] (0,0) rectangle (3,3);
    \draw[elegant , draw = red] (1.5,0) rectangle (4.5,3);
  
    \fill (0,3) circle (1pt); 
    \node[left, font=\small] at (0,3) {$3$};

    \fill (1.5,0) circle (1pt); 
    \node[below, font=\small] at (1.5,0) {$t-4$};
    \fill (4.5,0) circle (1pt); 
    \node[below, font=\small] at (4.5,0) {$t-1$};
    \fill (3,0) circle (1pt); 
    \node[below, font=\small] at (3,0) {$3$};

    \node[above, font=\small] at (4,3) {$f_2(t-\tau)$};
    \node[above, font=\small] at (1,3) {$f_1(\tau)$};

    \node[below, font=\small] at (2.5,-0.5) {$(e)$};

\end{tikzpicture}

4895416521.png

电路图类

  1. 基础电路组件

    \usetikzlibrary{circuits.ee.IEC}
    
    
    \begin{tikzpicture}[circuit ee IEC]
        
        % 带标签的电阻(您之前用的格式)
        \draw (0,0) to[resistor={info={$R$}}] (4,0);
        \node[below, font=\small] at (2,-0.2) {$v_R(t)$};
        \node[below, font=\small] at (0,-0.2) {$+$};
        \node[below, font=\small] at (4,-0.2) {$-$};
        \draw[->] (0.3,0) -- (1,0) node[above] {$i_R(t)$};
        \node[above, font=\small] at (6,0.5) {$v_R(t)=R \cdot i_R(t)$};
        \node[above, font=\small] at (6,-0.2) {${\displaystyle i_R(t)=\frac{v_R(t)}{R}}$};
    
        \draw (0,-2) to[capacitor={info={$C$}, info'={$v_C(t)$}}] (4,-2);
        \draw[->] (0.3,-2) -- (1,-2) node[above] {$i_C(t)$};
        \node[below, font=\small] at (0,-2.2) {$+$};
        \node[below, font=\small] at (4,-2.2) {$-$};
        \node[above, font=\small] at (6.7,-2) {${\displaystyle v_C(t)=\frac{1}{C} \int_{-\infty}^{t}i_C(\tau)d\tau}$};
        \node[above, font=\small] at (6,-3) {${\displaystyle i_C(t)=C \frac{v_C(t)}{R}}$};
    
        \draw (0,-4) to[inductor={info={$L$}, info'={$v_L(t)$}}] (4,-4);
        \node[below, font=\small] at (0,-4.2) {$+$};
        \node[below, font=\small] at (4,-4.2) {$-$};
        \draw[->] (0.3,-4) -- (1,-4) node[above] {$i_L(t)$};
        \node[above, font=\small] at (6,-4.3) {${\displaystyle i_L(t)=L\frac{v_l(t)}{R}}$};
        \node[above, font=\small] at (6.7,-5.3) {${\displaystyle v_L(t)=\frac{1}{L} \int_{-\infty}^{t}i_L(\tau)d\tau}$};
        
    \end{tikzpicture}
    

4845215415.png