Example: Clipped Output Sine Wave Signal

Published 2014-03-15 | Author: Christian Feuersänger

A sine curve, where the y-values do not exceed a certain value.

PGFPlots has two different types of clipping: the first is the graphical clipping operation which is activated by clip, the second is based on coordinate value manipulation, more precisely by restrict y to domain*.

This topic was discussed on: LaTeX-Community.org

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Clipped Output Sine Wave Signal

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de.

% Create a function for generating inverse normally distributed numbers using the Box–Muller transform
\newcommand*{\val}{0.8}% the absolut value of the limit
% Code for brownian motion
        domain     = -6.283:6.283,
        grid       = both, minor tick num=2,
        title      = Clipped Output Sine Wave Signal,
        xlabel     = Time,
        ylabel     = Volt,
        legend pos = outer north east,
        restrict y to domain* = -\val:\val
      \addplot[blue, line width=2pt] {\val};
      \addplot[blue!50, line width=2pt] {-\val};
      \addplot+[no marks, samples=100, red, line width=2pt] {sin(deg(x))};
      \legend{max.Output Voltage, max.Output Voltage, Clipped Signal}


Adding comments is currently not enabled.