BNdog =[23;107;108;23;107;108];
YON_BLNM =[23;107;108];
ri=[0;124.5383;0;32.2448;0;43.2158];
Z =[186.6933;354.4481;111.2320];
Z =[Z;Z];
r = reshape(flip(reshape(ri,2,[]),2),[],1);
Y = flip(YON_BLNM);
[~,ii] = ismember(BNdog,Y);
[~,i2] = sort(ii);
t_den = Z(i2) + r;