findcriticalpoints.m

来自「最新的HHT时频分析程序By Huang and Wu」· M 代码 · 共 30 行

M
30
字号
function [allx, ally] = findcriticalpoints(datay)%% [allx, ally] = findcriticalpoints(datay):%% The function FINDCRITICALPOINTS returns max, min and zero crossing values% and their coordinates in the order found in datay(n),% where n specifies the dimension of array datay.% The value datay(i) is considered to have a local minimum in i,% if datay(i-1) > datay(i) < datay(i+1);% The value datay(i) is considered to have a local maximum in i,% if datay(i-1) < datay(i) > datay(i+1);% The value datay(i) is considered to have a zero crossing, if% datay(i) and datay(i+1) have different signs. The coordinate% of datay(i) is linearly interpolated.%% Input-%	datay	- input vector of values% Output-%	allx	- vector that specifies the coordinates of max, min%		    and zero crossing values in the order found%	ally	- corresponding max, min and zero values%% Karin Blank (NASA GSFC)	    March 26, 2003  Initial% Jelena Marshak (NASA GSFC)	July 16, 2004 Modified%	(Replaced '&&' by '&' in zero-crossing calculation section.)%	(Corrected zero-crossing calculation.)%% Notes-% Used by FAZ, FAZPLUS

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?