Resonance and marginal instability of switching systems. (August 2015)