Inefficient version of matrixChar using pure