% function for generating the controller transferfunction
% on the form gc = K + I/s

function gc = controller(K, I)



s = tf('s');

if nargin == 2
    gc = K + I/s;   % PI Controller
elseif nargin == 1
    gc = tf(K);     % P controller
end

return


