modified syntax of calling function  repmat() to run using older versions of matlab