function y=iden3(signal)
l=length(signal);
a=0;  
b=0;
c=0;
d=0;
type=0;
 
for ii=1:l  %对基带信号依据象限进行分类
    if 0<angle(signal(ii))&&angle(signal(ii))<pi/2
        a=a+1;
        point1(a)=signal(ii);
    elseif pi/2<angle(signal(ii))&&angle(signal(ii))<pi
        b=b+1;
        point2(b)=signal(ii);
    
    elseif -pi<angle(signal(ii))&&angle(signal(ii))<-pi/2
        c=c+1;
        point3(c)=signal(ii);
    
    elseif -pi/2<angle(signal(ii))&&angle(signal(ii))<0
        d=d+1;
        point4(d)=signal(ii);
    end
end
angle1=angle(mean(point1));  %中心点相角
angle2=angle(mean(point2));
angle3=angle(mean(point3));
angle4=angle(mean(point4));
dx=(pi/180)*5;
dp=diff(angle(signal));
for k=1:l-1
   if dp(k)>pi
       dp(k)=dp(k)-2*pi;
   elseif  dp(k)<-pi
       dp(k)=dp(k)+2*pi;   
   end
end    
dp=abs(dp);
dy=(pi/180)*10;
length1=length(find(pi/2-dy<dp&dp<pi/2+dy));
length2=length(find(pi-dy<dp&dp<pi+dy));
 
if (pi/4-dx<angle1&&angle1<pi/4+dx)&&(pi*3/4-dx<angle2&&angle2<pi*3/4+dx)&&(-3*pi/4-dx<angle3&&angle3<-3*pi/4+dx)&&(-pi/4-dx<angle4&&angle4<-pi/4+dx)  %开始判定
    if length1>10*length2
    type=2;
    else type=1;
    end
else type=3;
end
y=type;
