clc;
clear;
N=64;
n=0:N-1;
f1=0.1;f2=0.15;f3=0.25;f4=0.4;
fa1=pi/6;fa2=pi/3;fa3=pi/2;fa4=pi/4;
s1=cos(2*pi*f1*n+fa1);
s2=cos(2*pi*f2*n+fa2);
s3=cos(2*pi*f3*n+fa3);
s4=cos(2*pi*f4*n+fa4);
x=s1+s2+s3+s4;
subplot(2,2,1);
plot(x);
X=fft(x);
X=fftshift(X);
subplot(2,2,2);
plot((n-N/2),abs(X));
subplot(2,2,3);
[bspec,waxis]=bispeci(x,10);
subplot(2,2,4);
mesh(abs(bspec));