www.gusucode.com > signal 案例源码程序 matlab代码 > signal/DutyCycleOfBilevelWaveformWithSampleRateExample.m
%% Duty Cycle of Bilevel Waveform with Sample Rate % Determine the duty cycle of a bilevel waveform. The sample rate is 4 MHz. % Copyright 2015 The MathWorks, Inc. %% load('pulseex.mat','x','t') fs = 1/(t(2)-t(1)); d = dutycycle(x,fs) %% % Annotate the result on a plot of the waveform. dutycycle(x,fs);