%% Peak-to-Peak Value of Vector
% Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent  step syntax. For example, myObject(x) becomes step(myObject,x).
% Determine the peak-to-peak value for a vector input.

in = (1:10)';
ptp = dsp.PeakToPeak;
y = ptp(in)

% Copyright 2012 The MathWorks, Inc.