%% Peak-to-RMS Ratio of Matrix Input
% 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-RMS ratio of a matrix input.

in = magic(4);
ptr = dsp.PeakToRMS;
ptr.Dimension = 'All';
y = ptr(in)

% Copyright 2012 The MathWorks, Inc.