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

📄 curvature.m

📁 这是一个关于hht变换很有用的工具箱
💻 M
字号:
function h=ddk(x);

% The function DDK calculates the curvature of data. 
%
% Calling sequence-
% h=ddk(x)
%
% Input-
%	x	- 1-D vector of input data x(n)
% Output-
%	h	- 2-D matrix of input data h(n,1) that 
%		  specifies the curvature of input data
 
% Z.Shen (Caltech)		Initial

%----- Get dimensions
n=length(x);

%----- Initialize
z=zeros(n,1);
h=zeros(n,1);

%----- Calculate the curvature
for i=2:n-1
   z(i)=(x(i+1)-x(i-1))/2.;
   h(i)=x(i+1)+x(i-1)-2*x(i);
end
z(1)=x(2)-x(1);
z(n)=x(n)-x(n-1);
h(1)=z(2)-z(1);
h(n)=z(n)-z(n-1);

for i=1:n
   a1=(1+z(i)*z(i))*sqrt(1+z(i)*z(i));
   h(i)=-1*h(i)/a1;
end

⌨️ 快捷键说明

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