function maxh=fobj(lambda)

global Plothandle m1 k1 c1 ksi1 m2 ome1 ome2 C11 omega iomegmax

omegan2=lambda(1);
ksi2=lambda(2)/C11;
c2=2*ksi2*m2*omegan2;
k2=omegan2^2*m2;

for iomeg=1:length(omega)
     H11(iomeg)=(-omega(iomeg)^2*m2+k2+i*omega(iomeg)*c2)/((-omega(iomeg)^2*m2+k2)*(-omega(iomeg)^2*m1+k1)- ...
                  omega(iomeg)^2*m2*k2+i*omega(iomeg)*c2*(-omega(iomeg)^2*m1+k1-omega(iomeg)^2*m2));
end


set(Plothandle,'ydata',abs(H11)) 

drawnow

[maxh,iomegmax]=max(abs(H11));
