Write a MATLAB program to compute the ensemble averages of x(t), y(t), and z(t) as defined in Example 7.1 for N = 20, 50, and 100, where N is the number of sample functions.
Do this for 51 values of t for 0 ≤ t ≤ 2. Discuss the results. For N = 20, plot the ensemble average as a function of t. Why is it a sinusoid?