I have many arrays with various number of columns, that is, I have many 1*m matrices with m varies from 1 to 20. For instance, consider these three hypothetical arrays:
A1 = [1 14 20 8]
A2 = [5 1 20]
A3 = 
what I am after is creating a sprintf for each array to put together all array elements such that elements are separated by a dot. For the above examples, the desired outputs are
It is certainly simpler if all of the arrays have same number of columns. But since it is not the case, I have no idea how to proceed. I just want an algorithm which automatically generates the sprintf for me with the correct number of dots.