Periodic signals can be generated by obtaining a period and

Periodic signals can be generated by obtaining a period and adding shifted versions of this period. Suppose we wish to generate a train of triangular pulses. A period of the signal is x[n] = 0.5(r[n] ˆ’ 2r[n ˆ’ 2] + r[n ˆ’ 4]) where r[n] is the discrete-time ramp signal. Obtain the values of x[n] for 0 ‰¤ n ‰¤ 4 and write a script to generate x[n] and the periodic signal y[n]

3D x(п— 5k] У x[n — 5k] y[n]: k=-00

and plot 4 of the periods.