emin.m
来自「一种新的时频分析方法的matlab源程序。」· M 代码 · 共 39 行
M
39 行
function [mi, ti]=emin(x)
% The function EMIN returns the data min points and their coordinates.
%
% Calling sequence-
% [mi, ti]=emin(x)
%
% Input-
% x - vector of input data x(n)
% Output-
% mi - vector that specifies min points
% ti - vector that specifies the coordinates of min points
% Norden Huang (NASA GSFC) November 11, 1999 Initial
%----- Get dimensions
n=length(x);
%----- Initialize
n_x=1;
mi=0;
ti=0;
%----- Extract the set of max points and their coordinates
for i=2:n-1
if (x(i-1)>x(i))&(x(i)<=x(i+1))
mi=[mi x(i)];
ti=[ti i];
n_x=n_x+1;
end
end
%----- Define the output
mi=mi(2:n_x);
ti=ti(2:n_x);
mi=mi';
ti=ti';
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?