%% Extract Coefficients from Standard-Form 2-DOF PID Controller
% Typically, you extract coefficients from a controller obtained from another function, such as pidtune or getBlockValue. For this example, create a standard-form 2-DOF PID controller that has random coefficients.

rng('default');    % for reproducibility
C2 = pidstd2(rand,rand,rand,rand,rand,rand);

%
% Extract the PID coefficients, filter divisor, and setpoint weights.

[Kp,Ti,Td,N,b,c] = pidstddata2(C2);

% Copyright 2015 The MathWorks, Inc.