close all
clear all
clc
% load negativeindex.mat;
% load Positive.mat;
% load Snegative.mat;
% load label.mat;
% load gtopfeature.mat;
% window=14;
% nn=size(Fp,1);
% mm=nn+negativeindex;
% tlabel=[label(1:nn,:);label(mm,:)];
% window=15;
% top=30;
% [pCK,nCK,topfeature]=CKSSPselect(window,top,label,positive,negative);
% save('topfeature.mat','topfeature');
% [PCKSAAP,NCKSAAP]=CKSAAPgenerate(positive,negative,topfeature,window);


load gtopfeature.mat;
schar={};
for i=1:length(gtopfeature)
    temp=gtopfeature(i,:);
    mmm=str2num(temp(3));
    key=temp(1);
    for j=1:mmm
        key=[key 'x'];
    end
    key=[key temp(2)];
    schar{i}=key;
end
set(gcf,'color','white');
x=[0:pi/15:2*pi]; 
y=sum(PCKSAAP,1)./size(PCKSAAP,1); 
z=sum(NCKSAAP,1)./size(NCKSAAP,1); 
y=[y,y(1)]; 
z=[z,z(1)]; 
Mypolar(schar,x,y,'b');
% title(''); 

hold on %Á½ÕÛÏßÖØµþÏÔÊ¾ 
Mypolar(schar,x,z,'--m') 
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',2); 
% str={'positive' 'negative'};
% legend(str);