📄 emin.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -