# How to draw randomly spaced square wave

I am new to tikz and am not familiar with nomenclature so please excuse my raw expression here.

I need to say a non-periodic square wave. I saw this post How to draw a square wave? which talks about a periodic sq wave. Right now my solution comprises of drawing individual line segments and that taking too much time.

Is there a faster way of doing this

So Far:

\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{Grid+Irregular wave}
\begin{center}
\begin{tikzpicture}
\draw [black] (-5.0,0) -- (-4.75,0);
\draw [black] (-4.75,0) -- (-4.75,1);
\draw [black] (-4.75,1) -- (-4.5,1);
\draw [black] (-4.5,1) -- (-4.5,0);
\draw [black] (-4.5,0) -- (-4.0,0);
\draw [black] (-4.0,0) -- (-4.,1);
\draw [black] (-4.0,1) -- (-3.0,1);
\draw [black] (-3.0,1) -- (-3.0,0);
\draw [black] (-3.0,0) -- (-2.5,0);
\draw [black] (-2.5,0) -- (-2.5,1);
\draw [black] (-2.5,1) -- (-2.0,1);
\draw [black] (-2.0,1) -- (-2.0,0);
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}

• Can you show us what you have so far? – Thruston May 23 '15 at 21:10
• actually, i just want to show a non-periodic wave , so the transitions can be at any random time instance…..so the values that I used in my code are not important for me – NAASI May 23 '15 at 22:52

\documentclass[tikz]{standalone}