add resolution option to scale matrices of different sizes