Madrid is much better by far!!! But, as you can tell from my user name, I am quite bias.
Historically speaking though, Madrid has been a city where the people tend to be more lively and open than the people in Barcelona.
To Barcelona's advantage, they have the beautiful beach, whereas Madrid is land locked, however, Madrid has a MUCH better going out and city scene, so the ocean is rarely missed.
¨De Madrid Al Cielo¨ is a common Spanish phrase.
From Madrid, to heaven