Implementation to general Bode plot and margins function