Control of magnetic and electric responses with electric and magnetic fields in magnetoelectric heterostructures