xsmooth.m

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

M
29
字号
function h=xsmooth(nt,k)
 
% The function XSMOOTH returns data that is horizontally smoothed using MATLAB Library FILTFILT function.
% 
% Data x that requires smoothing should be in column form.
%
% Calling sequence-
% h=xsmooth(nt,k)
%
% Input-
%	nt	- 2-D input data nt(in,jn)
%	k	- number of smoothing points
% Output-
%	h	- 2-D smoothed output data h(in,jn)
 
% Z.Shen (JHU)			1997 Initial

%----- Get dimensions
[in,jn]=size(nt);

%----- Initialize
h=zeros(in,jn);

%----- Apply the filter to smooth data
q1=ones(1,k)/k;
for i=1:in
   h(i,:)=filtfilt(q1,1,nt(i,:));
end

⌨️ 快捷键说明

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