syntax of repmat repaired to work with older versions