www.gusucode.com > signal 案例源码程序 matlab代码 > signal/PeaktoPeakDifferenceOfSinusoidExample.m
%% Peak-to-Peak Difference of Sinusoid % Compute the maximum-to-minimum difference of a 100 Hz sinusoid sampled at % 1 kHz. % Copyright 2015 The MathWorks, Inc. %% t = 0:0.001:1-0.001; x = cos(2*pi*100*t); y = peak2peak(x)