Solution by sampled-data control of a consensus problem: an approach by stabilization in the sample-and-hold sense