Continuous to discrete time signal
I used the signal $ y = cos(n)\, $ as the signal of my graph
First lets look at sampling the graph at each 1 sec
The dots are scattered everywhere, and is not periodic since $ y[n] \neq y[n+k], k \neq \R \, $
However, once we made some modifications to the graph, turn it into $ y = cos( \frac{\pi}{2} n)\, $, and sample it at every 1 sec
The dotes goes periodically from 1 to -1 and back to 1, every 4 seconds.
As $ y[n] = y[n+k], k = \R \, $, the function is periodic
Creating periodic signals from non periodic signals
Using back my own signal, $ y = x^2 \, $, i'll create a signal with a period of 5units.
Matlab Code :
t_1 = [0.001:0.001:5]; t_2 = [5.001:0.001:10]; t_3 = [10.001:0.001:15]; %time shifting each signal y_1 = t_1.^2; y_2 = (t_2 - 5).^2; y_3 = (t_3 - 10).^2; %combine the signals together z = [y_1 y_2 y_3]; t = [0.001:0.001:15]; %Plot the graph plot(t,z); xlabel('t'); ylabel('y');
The graph goes back to itself with the period of 5 units