📄 sinc_art.m
字号:
function x=sinc_art(N,wd)% y = sinc_art(N, wd);% N = length of pulse (in samples)% wd = approx percentage of pulse that central lobe occupies% (e.g. for N=256, a one second window of ECG sampled at 256Hz, wd=10 % gives a central lobe of approx 0.14 seconds (35 samples) )% % uses SINC Sin(pi*x)/(pi*x) function to generate artificial muscle-like% artefacts on ECG. % % see PULSTRAN for generating a continuous time series of this output % (but remember that artefacts are not periodic!!!!)%% See also: SINC SQUARE, SIN, COS, CHIRP, DIRIC, GAUSPULS, % PULSTRAN, RECTPULS and TRIPULS % Author: G. Clifford, 15-1-03% Copyright 2003 Oxford Universityif nargin <2 wd = 10; end% how long is half a windowlen=round(N/2);% for indexes into arrayy=ones(1,len);i=find(y);% 'normalise' periodii = i/length(y);% calculate one half of sinc functiony(i)=sin(pi*ii(i)*100/wd)./(pi*ii(i));% reflect in originz(len+1-i)=y(i);% concatonate two vectors to form whole sinc fnx=[z y];% normalise amplitudex = x/max(x);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -