function [ RR,name ] = SelectionTable(  )
[ RR,name ] = collect(  )
[n,p] = size(RR);
RR(:,2)=[];
temp = RR(:,2).*RR(:,3);
index = find(temp==0);
RR(index,:)=[];
name(index,:)=[];

EMMSE = RR(:,1);
TruePositive = RR(:,2);
TrueNegative = RR(:,3);
PN = RR(:,4);
columns = {'name','EMMSE','TruePositve','TrueNegative','PN'};
data = table( name,EMMSE,TruePositive,TrueNegative,PN,'VariableNames',columns );
writetable(data,'resultXSHE.csv');
end

function [ RR,name ] = collect(  )
dirs = dir('C:\Users\zsqhndn\Desktop\DPF test\5h300test\XSHEmat\*.mat');
dircell = struct2cell(dirs)';
filenames = dircell(:,1);
LNTH = length(filenames);
paths = dircell(:,2);
s=1;
for KK = 1:LNTH
    file2 = cell2mat( dircell(KK,1) );
    file1 = cell2mat( dircell(KK,2) );
    file = [file1,'\', file2];
    load( file );
    name(s,:) = file2(1:end-4);
    RR(s,:) = result(2,:);
    s=s+1;
    clear data result C;
end
end

