findintercept(Yin,varargin)
% [up,down] = findintercept(Yin), detects the intercept with signal Yin
% Options: 'Threshold','MinGradient','InterceptWidthRange',...
% 'MinInterceptDistance','MinInterceptAvarage','MinPeakHeight'
% followed by a number and Method: 'Linear','Nearest'
%
% 'Threshold': Gives the intercept with Yin
% 'MinSlope': The slope calculated from the first neighbour peak to
% neighbour valley. Supports both single value and range.
% 'InterceptWidthRange': Minimal and maximal width between intercepting points.
% Supports both single value and range. Starts with first up or down. To
% force a start use 'StartPair'.
% 'MinInterceptDistance': Distance between intercept points of either downward
% or upward intercepts.
% 'MinInterceptAvarage': Avarage over points above or under the intercept.
% Supports both single value and two values for averages above and below threshold.
% 'StartPair': 0,'Up','Down','First'_ forces starting with an
% upward or downward slope. By default it will start without any
% pre-settings (0);
% 'NIntercepts': specifies the maximum number of intercepts
%
%
% Optional output:
% no output = figure with results
% varargout{1} = Av; %Average between intercept points
% varargout{2} = slope; %Slope of intercepting point
% varargout{3} = x; %x after interpolation
% varargout{4} = Yin; %Y after interpolation
%
% Ben van Oeveren, 19-03-2016: added startPair: 0 as default
Cite As
Ben Oeveren (2024). findintercept(Yin,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/53069-findintercept-yin-varargin), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Measurements and Feature Extraction > Descriptive Statistics >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.