function y=iden2(signal)
fs = 2e+6;       						% sampling rate (samples/second) 
sr = 1e+5;  						% symbol rate (symbols/second) 
fc=2e+5;                                %ÔØ²¨ÆµÂÊ
Ts = 1/fs; 								% sampling period 
Td = 1/sr;						% symbol period 
m = fs/sr;				% samples per symbol 
nd=1000;                        % number of data
type=0;
s2=signal(1:(length(signal)-m/2));
s2=conj(s2);
s1=signal((m/2+1):length(signal));
s=s1.*s2;
%n=length(s);
%n=0:length(s1)-1;
%f=(fs/(length(s1))).*n;
%plot(f,abs(fft(s1.*s2)))
ft1=abs(fft(s-mean(s)));
ft1=ft1(1:fix(0.5*length(ft1)));
[x1,idx1]=max(ft1);
ft2=abs(fft(signal.^2));
[x2,idx2]=max(ft2);
leftside=idx1-105;
rightside=idx1+105;
if rightside>length(ft1)
    rightside=length(ft1);
end
if leftside<1
    leftside=1;
end
%mean(ft1(idx1+5:idx1+105))
if (x1>5*(mean(ft1(idx1+5:rightside))))&&(x1>5*(mean(ft1(leftside:idx1-5))))
    if (x2>5*(mean(ft2(idx2+5:idx2+105))))&&(x2>5*(mean(ft2(idx2-105:idx2-5))))
        type=3;
    else type=1;
    end
else type=2;
end
y=type;
