function [a,b,c,d]=pt2(g,f,d)
%PT2    Creates state space description of a second order system
%       with gain g, frequency f [Hz] and damping d.
%
%       FORMAT:         [a,b,c,d]=pt2(g,f,d)
%
%       Matrix D may be omitted.
%
%       RELATED OPREATIONS:     B1L

%       K P Mueller 09-JUL-1991
%       Copyright (c) 1991, by IfR

error(nargchk(3,3,nargin));
error(nargchk(3,4,nargout));

a=[0 1; -(2*pi*f)^2 -4*pi*f*d];
b=[0; (2*pi*f)^2];
c=[g 0];

if nargout == 4
d=[0];
end
