MATLAB: % from a curve

pwelch psd integral trapz

hello
i got one curve plotted that i maded using pwelch and i want to get one specific value (at 95% of the curve)
how do i get that?
thx

Best Answer

% Define the value we're looking for in our data, callled "theCurve".
threshold = 0.95 * max(theCurve); % or whatever you want.
% Find where this happens the first time.
theIndex = find(yourCurve > threshold, 1, 'first');
Related Question