%% Nichols Response Magnitude and Phase Data
% Compute the magnitude and phase of the frequency response of a SISO system.
% If you do not specify frequencies, nichols chooses frequencies based on the system dynamics and returns them in the third output argument.

H = tf([1 0.1 7.5],[1 0.12 9 0 0]);
[mag,phase,wout] = nichols(H);

% Because H is a SISO model, the first two dimensions of mag and phase are both 1. The third dimension is the number of frequencies in wout.

size(mag)
length(wout)

% Thus, each entry along the third dimension of mag gives the magnitude of the response at the corresponding frequency in wout.
% Copyright 2021 The MathWorks, Inc.