ratioa.m

来自「一种新的时频分析方法的matlab源程序。」· M 代码 · 共 32 行

M
32
字号
function r = ratioa(h)
 
% The function RATIOA calculates the local non-orthogonal leakage for pair of adjoining components.
%
% Calling sequence-
% r=ratioa(h)
%
% Input-
%	h	- 2-D matrix h(n,k) of IMF components
%		 excluding the trend component.
% Output-
%	r	- vector of the ratio for adjoining components
%		(h(1,i)*h(1,j)+...+h(n,i)*h(n,j))/
%		(h(1,i)^2+h(1,j)^2)+...+(h(n,i)^2+h(n,j)^2)
%

%----- Get dimensions and initialize
[npt,knb] = size(h);
r1=zeros(knb-1,1);

%----- Calculate the ratio for each pair
for i=1:knb-1,
   j=i+1;
   a1=abs(sum(h(:,i).*h(:,j)));
   b1=sum(h(:,i).*h(:,i))+sum(h(:,j).*h(:,j));
   r1(i)=a1/b1;
end
%r=mean(r1);
%s=std(r1);
%q=max(r1-r);
r=r1;

⌨️ 快捷键说明

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