close all;
clear all;


ft = 200;

t_1 = 0 : 1/ft : (4-(1/ft)); %czas od 1 do 4 co ft próbkowane
t_2 = 4 : 1/ft : (8-(1/ft));
t_3 = 8 : 1/ft : (12-(1/ft));
t_4 = 12 : 1/ft : 20;

s_1 = sin(9*t_1*2*pi + 0);
s_2 = square(10*t_2*2*pi + pi/4); % pi = 180Â°. 
s_3 = 1*randn(1,length(t_3));
s_4 = repmat(9*t_4*2*pi + pi/2);

t = [t_1, t_2, t_3, t_4];
s = [s_1, s_2, s_3, s_4];


hold on;
grid on;
figure(1);
plot(t,s, 'r');