www.gusucode.com > signal 案例源码程序 matlab代码 > signal/PeaktoPeakDifferencesOf2DMatrixExample.m
%% Peak-to-Peak Differences of 2-D Matrix % Create a matrix where each column is a 100 Hz sinusoid sampled at 1 kHz % with a different amplitude. The amplitude is equal to the column index. % Copyright 2015 The MathWorks, Inc. %% % Compute the maximum-to-minimum differences of the columns. t = 0:0.001:1-0.001; x = cos(2*pi*100*t)'*(1:4); y = peak2peak(x)