test matrix extract and scale