I want to to avoid the transformation of the matrix into a string and then re-transforming the string into a matrix.
The matrix has a number of rows equal to the number of position to be assumed by the arm
each column represent a single motor
for example while the motors are completing their movements it's possible that different rows are sent via serial and I miss one because motors are still moving:
Serial.print('<'); // start markerSerial.print(value1);Serial.print(','); // comma separatorSerial.print(value2);Serial.println('>'); // end marker
so your code looks like this
You need to STOP matlab from spamming the Arduino. Only send a new row when the Arduino is ready for you to send a new row. That doesn't necessarily mean when it has completed a move. It could be working on a move while receiving data for the next move.