📄 xsmooth.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -