function [K,Ko,P]=lpe2(A,C,c)
% LBE Linear Butterworth observer and Estimator
% [K,Ko,P]=lpe2(A,C,c)

[m,n]=size(C);

% Compute the polynomial evaluation, P(A)
P=polyvalm(c,A);
On=obsv(A,C);

% Observer gain in observer form model..
Ko=C*P*inv(On); 
Ko=rot90(Ko);   % Gain in observer form (not needed)
Oi=inv(On);
K=P*Oi(:,n );   % Estimator gain in original coordinate system.