Hello i ha built this code which create a only one replica of the data, how can i create the whole photo shown bellow of many cycles as shown bellow? i read in the internet that zero padding could create it,but its not wotking. How could it be done? Thanks.
f1=10;
f2=20;
f3=70;
% twice the sampling rate
Fs=2.05*70; % sampling frequency is a bit above 2 times to get all the peaks.
Ts=1/Fs;
Tn=0:Ts:1;
fft_L=length(Tn);
y4_samples=10*sin(2*pi*f1*Tn)+10*sin(2*pi*f2*Tn)+10*sin(2*pi*f3*Tn);
%stem(Tn_new,y4_samples);
ff=fft(y4_samples);
ff1 = abs(ff/fft_L);
fft2 = ff1(1:floor(fft_L/2)+1);
fft2(2:end) = 2*fft2(2:end);
f = Fs*(0:fft_L/2)/fft_L;
plot(f, fft2)