win_num)%byLiYangBNUMATH05Email:farutoliyang@QQ:516667408%lastmodified2009.2.25%modifiedIGbasedonPedrybyKeqiangDong%output%low:lowbounds%R:representatives%up:upbounds%input%X:timesserieswaitedtobeIG%MFkind:thekindofmembershipfunction%triangletrapezoidasygaussasyparabola%win_num:numberofwindows%%ifnargin<3win_num=10;endifnargin<2MFkind='trapezoid';end[d1,d2]=size(XX);X=sort(XX);switchMFkind%trapezoidcase('trapezoid')ifwin_num==1ifmod(d2,2)~=0m=X((d2+1)/2);n=X((d2+1)/2);mflag=(d2+1)/2;nflag=(d2+1)/2;elsem=X(d2/2);n=X((d2+2)/2);mflag=d2/2;nflag=(d2+2)/2;endR(1,1)=m;R(2,1)=n;k1=mflag;k2=d2-nflag+1;c1=(sum(X(1:k1)))/k1;c2=(sum(X(nflag:d2)))/k2;low=2*c1-m;up=2*c2-n;elselow=[];R=[];up=[];k=floor(d2/win_num);fori=1:(win_num-1)[l,r,u]=FIG_D(XX((1+(i-1)*k):(k+(i-1)*k)),MFkind,1);low=[low,l];R=[R,r];