From: Mateusz on
Nx=64;
fs=1000;
t=1/fs*(0:Nx-1);

%==========================
A1=1;
A2=4;
f1=500;
f2=1000;

x1=A1*cos(2*pi*f1*t);
x2=A2*sin(2*pi*f2*t);
%==========================
x=x1+x2;
%==========================
N=64;
X=fft(x,N);