Creating a Square Wave in Excel 1.5 1 cycle Amplitude 1 Amplitude 0.5 0 -0.5 -1 -1.5 0 0.2 0.4 0.6 0.8 Time (sec) 1 1.2 1.4 Step 1. Create columns in Excel: for Amplitude, delta t, Time & Square Wave Step 2. Enter desired values for Amplitude and delta t (sec.) Step 3. Fill in column for Time (sec.) A. Enter in the initial time (in this example 0.0 sec.) in the first cell in the time column. B. Fill in the time column using Equation 1 ti+1 = ti + Dt (Equation 1) Note: you need to fix the cell for delta t in Equation 1. This can be done by adding a $ in front of the Row and Column values or by pressing „F4‟. Step 3. C. Fill in column for Time (sec.) Highlight the desired number of rows in the time column and fill down (Ctrl +D). Continued Step 3. Fill in column for Time (sec.) Time column after “Filling Down” Continued Step 4. Generate Square Wave The period (T) of the Square Wave is equal to the inverse of the frequency (f) T (sec.) T/2 T=1/f +A (Equation 2) t (sec.) A , 0 < t < T/2 Square Wave A , T/2 < t < T -A T/2 Step 4. Generate Square Wave Continued For this example: Generate a 4 Hz Square Wave with an Amplitude of 1.0 f = 4 Hz; therefore, T = 0.25 sec. 0.25 sec. 0.125 sec. +1 t (sec.) -1 0.125 sec. Step 4. Generate Square Wave Continued 0 < t < T/2 A , 0 < t < T/2 Amplitude A , T/2 < t < T 1 Amplitude 0.5 0 0 0.05 0.1 0.15 -0.5 -1 -1.5 Time (sec.) 0.2 0.25 0.3 T/2 < t < T 1.5 Step 4. Generate Square Wave Copy cells E3 through E52 for additional Square Wave cycles. 1.5 1 Amplitude 0.5 0 0 0.1 0.2 0.3 0.4 0.5 -0.5 -1 -1.5 Time (sec.) 0.6 0.7 0.8 0.9 1 Continued