none of those seem to work this case.
So I fixed it simply like this. It gives me the first time that the accuracy of a given frequency is 95%, which is what in need;)
duration = 0.2:0.2:8
nfrequencies = 6
threshold = accuracy*100>=95;
X = zeros(nfrequencies,1)
for l=1:nfrequencies
fthreshold = find(threshold(:,l));
if fthreshold >= 1
Y = duration(fthreshold(1));
else
Y = max(duration);
end
X(:,l)= Y;
end
