⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ds.m

📁 这是一个关于hht变换很有用的工具箱
💻 M
字号:
function z=ds(nt)
%    z=ds(nt):  
%    Function to analyze the degree of stationarity of data nt(n,m) by
%    calculating the variance  for each n, where n specifies the number 
%    of frequency values, and the length of time series.
%
%    Input-
%	nt	- 2-D matrix nt(n,m) that specifies the HHT spectrum
%    Output-
%	z	- vector that specifies the degree of stationarity 
%		  for each frequency value
%
%    Norden Huang (NASA GSFC)	Initial
%    Jelena Marshak (NASA GSFC)	Nov.7, 2003 Modified and edited
%				(added mean value check for zero)
%
%    Notes-
%    An input matrix can be generated by calling a function that
%    generates the spectrum, for example 'nsp()' or 'nspab()'.
%    If mean value is zero, its components are assumed to be near zero.

%---- Get dimensions (number of frequency and time values)
ii=size(nt);
jf1=ii(1);

%---- Calculate the mean for each frequency value
ms=sum(nt,2);
ms=ms/ii(2);

%---- Normalize and calculate the variance
for i=1:jf1
    if(ms(i)~=0)
      nt(i,:)=nt(i,:)/ms(i);
    end
end
nt=1-nt;
nt=nt.*nt;
z=sum(nt,2);
z=z/ii(2);
%z(1)=0.;

⌨️ 快捷键说明

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