Constraining the properties of neutron-star matter with observations