?? zmax.m
字號:
function h=zmax(x)
%
% h=zmax(x):
%
% Function to extract the set of max points of a 1-D data.
%
% Input-
% x - vector of input data x(n)
% Output-
% z - vector that specifies the values of max points
%
% Z.Shen (Caltech) May, 1997 Initial
% Jelena Marshak (NASA GSFC) March 9, 2004 Edited
%
%----- Get dimensions
n=length(x);
%----- Initialize
n_x=1;
h=0;
for i=2:n-1
if (x(i-1)<x(i))&(x(i)>=x(i+1))
h=[h x(i)];
n_x=n_x+1;
end
end
%----- Define the output
h=h(2:n_x);
h=h';
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -