OK, now I think I see what the problem is. In loop() the code calls Serial.available() to see if at least one byte is ready in the serial input. Then it reads one byte:
byte s = Serial.read();
So far, so good. But then you have a problem because you call Matrix_serialRead(), which tries to read a whole bunch of bytes inside the for loops with:
Matrix_string[c][r] = Serial.read();
The problem is that Serial.read() does NOT WAIT for serial data to be available. If a byte is not ready, it will immediately return -1. If you change the above line to the following, and take out all the other things you used for artificial delay, I bet it will work fine:
while (Serial.available() == 0) {
// do nothing... just wait for a byte to arrive
}
Matrix_string[c][r] = Serial.read();
You might even add the following utility function which will always wait for a byte to be available:
char getbyte()
{
while (Serial.available() == 0) {
// do nothing
}
return Serial.read();
}
Then you could just do:
Matrix_string[c][r] = getbyte();