//Fourier Series coefficients of half-wave rectifier output //Assume the period of the signal T=1 t=-0.5:0.01:1; T = 1; for i=1:length(t) if t(i)