MATLAB script used to generate Figure 2 in the paper (isometric diagram of an average complex waveform of lightning).