rspns.m

来自「这是一个关于hht变换很有用的工具箱」· M 代码 · 共 33 行

M
33
字号
function wa=rspns(x1,x2)
% wa=rspns(x1,x2):
%
% Function to compute the Hilbert response function 
% from one input, x2,  and one output, x1, both are Hilbert spectra
% of the same dimensions.
% The basic formula is based on R=output/input; therefore,
%
%			wa=rspns(x1,x2)
%
% The algorithm has put 0.01 at any point having zero for value.
%
% Input-
%	x1,x2	- 2-D matrix
% Output-
%	wa	- 2-D matrix ( wa=x1/x2 )
%

a1=size(x1);
ix=a1(1);
iy=a1(2);
wa=ones(ix,iy);
wa=wa*0.01;

for i=1:ix
   for j=1:iy
      if(abs(x2(i,j))>.1 & abs(x1(i,j))>.1 )
         wa(i,j)=x1(i,j)/x2(i,j);
      end
   end
end

         

⌨️ 快捷键说明

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