x=linspace(0,2*pi,101);
fa=sin(2*pi*x)+sin(2*pi*4*x);

%DFT%
gr=size(fa);
N=gr(2);
%ck Feld anlegen
ck=linspace(0,0,N);
%ck berechnen
for m=1:N
for a=1:N
ck(m)=ck(m)+fa(a)*exp(-i*(m-1)*(a-1)*2*pi/N);
end
end
ausg=ck;
%ENDE DFT%

%Skalierungsversuch der Frequenzachse/x-Achse%
T=1;
deltaf=1/T;
endex=deltaf*100;
xachse=linspace(0,endex,101);

subplot(2,2,1)
plot(xachse,abs(ck));
ff=abs(fft(fa));
subplot(2,2,2)
plot(xachse,ff);

subplot(2,2,3)
plot(xachse,abs(fftshift(ck)));
ff=abs(fftshift(fft(fa)));
subplot(2,2,4)
plot(xachse,ff);
