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

    %% Mid-Reference Level Instant of Bilevel Waveform
% Assuming a sampling interval of 1, compute the mid-reference level
% instant of a bilevel waveform. Plot the result.

% Copyright 2015 The MathWorks, Inc.


load('transitionex.mat','x')

midcross(x)

%%
% The instant at which the waveform crosses the 50% reference level is
% 21.5. This is not a sampling instant present in the input vector.
% |midcross| uses interpolation to identify the mid-reference level
% crossing.