3

I want to draw a rectified signal with (blue) and without a capacitor (black). This is what I'm getting

enter image description here

This is what I want

enter image description here

Code:

\begin{figure}[H]
 \begin{tikzpicture}
    \draw (0,0) -- (12,0);
    \draw (0.2,1.5)node[left,font=\tiny] {$y=12$} -- (11.8,1.5);
    \draw (0.2,-1.5)node[left,font=\tiny] {$y=-12$} -- (11.8,-1.5); 
    \foreach \x in {0,0.5,...,12}{
    \draw (\x,-0.2)node [below,font=\tiny,] {\x} -- (\x,0.2) ;
    }
    \draw[ thick, black] (0,0) sin (1,1);    %% the real business in this line
    \draw[ thick, black] (1,1) cos (2,0);    %% the real business in this line
        \draw[ thick, line join=round , blue] (1,1) to (4.1,0.35);
    \draw[ thick, black] (2,0) to  (3,0);    %% the real business in this line
    \draw[ thick, black] (3,0) to (4,0);    %% the real business in this line
        \draw[ thick, black] (4,0) sin (5,1);    %% the real business in this line
    \draw[ thick, black] (5,1) cos (6,0);    %% the real business in this line
    \draw[ thick, black] (6,0) to (7,0);    %% the real business in this line
    \draw[ thick, black] (7,0) to  (8,0);    %% the real business in this line
    \draw[ thick, black] (8,0)  sin (9,1);    %% the real business in this line
    \draw[ thick, black] (9,1) cos (10,0);    %% the real business in this line
    \draw[ thick, black] (10,0) to (11,0);    %% the real business in this line

    \end{tikzpicture}
\caption{nach  gleischrichtung}
    \label{halb_welle_schaltung}
    \end{figure}
Salim Bou
  • 17,021
  • 2
  • 31
  • 76
fethi
  • 31

0 Answers0