% This function renders the distance matrix by spectrum comparison between 
% a given sequences set (SequencesToEvaluate), and maps them into signals
% considering the specified adyacent nucleotides (alpha).

function [DistFFTTMP]=FFTNonFiltered(SequencesToEvaluate,alpha)

n=numel(SequencesToEvaluate);

% Transform Sequences by MT
for i=1:n
        SeqTM{i}=DNAMeltingArbitrary(SequencesToEvaluate{i},alpha);
        TMlength(i)=length(SeqTM{i});
end

% Max length of TM Signals
MaxTMlength=max(TMlength);


% Signal Pretreatment 

for j=1:n
    Signalpretreat{j}=Signalpretreatment(SeqTM{j});
end

% FFT spectrum comparison
Counter=1;
l=floor(MaxTMlength/2);


 for y=1:n
     for x=y+1:n
        AP=fft(Signalpretreat{y},MaxTMlength);
        AP=AP(3:l);
        AP=abs(AP);
        A2{Counter}=AP;

        BP=fft(Signalpretreat{x},MaxTMlength);
        BP=BP(3:l);
        BP=abs(BP);
        B1{Counter}=BP;
        
        C1=corrcoef(AP,BP);
        DistFFTTMP(Counter)=1-(C1(1,2));
       
        Counter=Counter+1;
     end
     
 end  
 
end