Centroid Of A Signal Matlab