function iumb=thresholdcross(X,umbral) % ---- Position of the first value of X crossing the threshold umbral ---- if ~isempty(X) % JGM if X(1)>umbral I=find(Xumbral); if ~isempty(I) iumb=I(1); if abs(X(iumb-1)-umbral)