Added implementation for setting a scaled matrix