/
/
>> kmax=10;
>> Tk=0.5;
>> dF=0.2;
>> T0=Tk/2;
>> A=1;
>> Fmax=kmax*1/T0;
>> T=1/dF;
>> Ts=1/(2*Fmax);
>> t=0:Ts:(T-Ts);
>> x=abs(A*sin(2*pi*t/T0));
>> y=fft(x);
>> f=(-1/(2*Ts)):dF:1/(2*Ts)-dF;
>> yy=fftshift(y);
>> xx=abs(yy);
>> figure(1);
>> t1=0:Ts:T/4;
>> x1=abs(A*sin(2*pi*t1/T0));
>> plot(t1,x1);
>> figure(2);plot(f,xx);
>>