Running Extrema

버전 1.0.0.0 (2.72 KB) 작성자: Dan K
Returns the running minimum or maximum of a vector or matrix (analagous to the running average)
다운로드 수: 1.7K
업데이트 날짜: 2008/6/25

라이선스 보기

Given a set of data, this function is intended to return an output of the same size which gives the lowest (or highest) values which are present within the specified window size. Algorithm is *much* faster than sequential calls to min with reduced ranges, at least for large data sets.

% runningmin - Computes a running extreme of an input vector or matrix
% Optional file header info (to give more details about the function than in the H1 line)
% Syntax: out = runningmin(input,nSamples,type)
% input - vector or matrix of data to return the running min or max from
% nSamples - The size of the window to check for mins or maxes
% type - 'min','max', or 'both' (default) which type of extremes to return
% out - running minimum or maximum requested. If both minimum is returned
% first, then maximum
% Example
% [runMin,runMax] = runningExtreme(data,31,'both')
%
% Subfunctions: fillIn
% See also: min, max, sort

인용 양식

Dan K (2024). Running Extrema (https://www.mathworks.com/matlabcentral/fileexchange/18551-running-extrema), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Switched to the much faster 1-D Van Herk Algorithm. According to theory uses 3 comparisons per data point, no matter the size of the filter.