Getting values from mat2

Getting values from mat2 and passing them to next processor
test.sh edited for testing reasons