Hi I need to calculate matrix size by count elements in array,
for example if I have 25 elements in list, I need get columns = 5 and row 5 in matrix,
If 26 elements 5 columns 6 rows etc.
thank.
Hi I need to calculate matrix size by count elements in array, for example
Share
I don’t know what your exact requirements are, but if you want to produce a near-square matrix that doesn’t waste much space,
produces the dimensions of the smallest matrix with the number of rows and columns differing by at most one that can hold
num_elemselements.