coding for 4*13 led matrix

i have coding for 246 led matrix but i don't know how to code for 413 led matrix.There is 4 rows and 13 columns.i have attach circuit diagram and coding

circuit.pdf (381 KB)

looping text.txt (9.25 KB)