I've tried with this, but I got an empty box for my parameter "ini_amp". So, the reasoning behind this code was to use "size" in order to get the highest (or lowest, regarding the variable) number if the size is higher than 1. For example, if there are more than one values for minVal_10, the if statement takes the min value for minVal_10
value10=size(minVal_10);
if value10~1;
value10==min(minVal_10);
else value10==minVal_10;
end
minVal_50=A(idx2==1);
value50=size(minVal_50);
if value50~1;
value50==max(maxVal_50);
else value50==maxVal_50;
end
T10=find(A==value10); %Gives you the row where 10% of the time lies in the Intensity matrix
T50=find(A==value50); %Gives you the row where 50% of the time lies in the Intensity matrix
I_T10=B1(T10,1);
I_T50=B1(T50,1);
ini_Amp=(I_T50-I_T10)*10^6;