📄 get_impulses.m
字号:
function [p,m,md,s]=get_impulses(ts,threshold,max_std)%% GET_IMPULSES% get impulses from a noisy series of pulses% % USAGE % [p,m,md,s]=get_impulses(x,threshold,max_deviation)% % Detects pulses p as a change in the signal > threshold% Changes closer than max_deviation percent of the % median pulse difference are discarded.%% Provides mean(m), median (md) and standard deviation(s)% of times between pulses% File: get_impulses.m% Last Revised: 25/11/97% Created: 25/11/97% Author: Andrew C. McCormick% (C) University of Strathclyded=diff(ts);p=find(d>threshold);md=median(diff(p));x=find(diff(p)>md-(max_std*md/100));p=p(x);md=median(diff(p));x=find(diff(p)<md+(max_std*md/100));p=p(x);dp=diff(p);x=find(dp<md+(max_std*md/100));md=median(dp(x));m=mean(dp(x));s=std(dp(x));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -