%%%%%%%%%第四个文件：计算氨基酸在正负序列片段出现的频率%%%%
function [PM,NM]=Probability(positive,negative)
letter=['A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','V','W','Y'];
PM=[];
NM=[];
%%%%%%positive%%%%%%%%%%%%%%%
num=size(positive,2);
m=size(positive,1);
for i=1:num
    temp=[];
    for j=1:length(letter)
        temp=[temp length(find(positive(:,i)==letter(j)))];
    end
    PM=[PM;temp];
end   
%PM=PM/m;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%negative%%%%%%%%%%%%%%%
num=size(negative,2);
m=size(negative,1);
for i=1:num
    temp=[];
    for j=1:length(letter)
        temp=[temp length(find(negative(:,i)==letter(j)))];
    end
    NM=[NM;temp];
end   
%NM=NM/m;
