www.gusucode.com > signal 案例源码程序 matlab代码 > signal/MidReferenceLevelInstantsOfPulsePeriodExample.m

    %% Mid-Reference Level Instants of Pulse Period
% Determine the mid-reference level instants that define the pulse period
% for a bilevel waveform.

%%

load('pulseex.mat','x','t')
[~,initcross,~,nextcross] = pulseperiod(x,t)

%%
% Output the pulse period. Mark the mid-reference level instants on a plot
% of the data.

pulseperiod(x,t)