clear statxt;
clear Res;

 srad = vertcat( srad_P220_pad1, srad_P220_pad2, srad_P220_pad3, srad_P220_pad4, srad_P220_pad5);
 srad15(:,1)= srad(:,2);
 srad15(:,2)= srad(:,5);
 srad15(:,3)= srad(:,10);
 srad15(:,4)= srad(:,15);
 srad15(:,5)= srad(:,20);
 srad15(:,6)= srad(:,25);
 srad15(:,7)= srad(:,30);
 srad15(:,8)= srad(:,35);
 srad15(:,9)= srad(:,40);
 srad15(:,10)= srad(:,45);
 srad15(:,11)= srad(:,50);
 srad15(:,12)= srad(:,75);
 srad15(:,13)= srad(:,100);
 srad15(:,14)= srad(:,150);
 srad15(:,15)= srad(:,200);
 
 srad_amostras = vertcat( srad_P220_min, srad_P220_Ok, srad_P220_max );

 srad15_am(:,1)= srad_amostras(:,2);
 srad15_am(:,2)= srad_amostras(:,5);
 srad15_am(:,3)= srad_amostras(:,10);
 srad15_am(:,4)= srad_amostras(:,15);
 srad15_am(:,5)= srad_amostras(:,20);
 srad15_am(:,6)= srad_amostras(:,25);
 srad15_am(:,7)= srad_amostras(:,30);
 srad15_am(:,8)= srad_amostras(:,35);
 srad15_am(:,9)= srad_amostras(:,40);
 srad15_am(:,10)= srad_amostras(:,45);
 srad15_am(:,11)= srad_amostras(:,50);
 srad15_am(:,12)= srad_amostras(:,75);
 srad15_am(:,13)= srad_amostras(:,100);
 srad15_am(:,14)= srad_amostras(:,150);
 srad15_am(:,15)= srad_amostras(:,200);
 
 
% statxt_amostras = vertcat( statxt_P220_min, statxt_P220_Ok, statxt_P220_max );
% statxt = vertcat( statxt_P220_pad1, statxt_P220_pad2, statxt_P220_pad3,statxt_P220_pad4);

% dPm = mahal( statxt_amostras, statxt );
dPm = mahal( srad15_am, srad15 );

dPm = dPm/max(max(dPm));

dP150m = dPm(1:1:50,:);
dP180m = dPm(51:1:100,:);
dP500m = dPm(101:1:150,:);

% dP500_OKm = dPm(1:1:50,:);
% dP500_MAXm = dPm(51:1:100,:);

Res =[ dP150m dP180m dP500m]
