Led matrix brightness problem

Thanks PaulRB.

Without loop it's working same. now can i use that code?