function maxh = fobjn(lambda)

global Plothandle meq keq ceq freq omeg G alf pg ma
% global Plothandle
%
omega=lambda;
G_omega=g_cmplx(alf,pg,omega);

for ii=1:length(freq)
    r=real(G(ii))/real(G_omega);
    eta=imag(G(ii))/real(G(ii));
    epsil=omeg(ii)/omega;
    m_equiv=-ma*r*(epsil^2-r*(1+eta^2))/((epsil^2-r)^2+(r*eta)^2);
    c_equiv=ma*omega*r*eta*epsil^3/((epsil^2-r)^2+(r*eta)^2);
    H11(ii)=-omeg(ii)^2/(-omeg(ii)^2*(meq+m_equiv)+1i*omeg(ii)*(ceq+c_equiv)+keq);
end;
  H12=20*log10(abs(H11)); 
%
%
set(Plothandle,'ydata',H12)
drawnow
%
maxh=max(H12);
