MHB How can I get equal columns and rows from a total?

  • Thread starter Thread starter SLSCoder
  • Start date Start date
  • Tags Tags
    Columns
Click For Summary
To determine the number of equal columns and rows from a variable total of cells, the calculation involves using the floor function on the square root of the variable x. For example, if x equals 10, the result is 3 columns and 4 rows, with the last row containing only one value. The formula effectively helps in organizing the cells into a grid format. This method ensures that the layout remains balanced while accommodating the total number of cells. Understanding this calculation is essential for efficient data presentation.
SLSCoder
Messages
4
Reaction score
0
I have a number of cells (say 10 cells) but that number is a variable.
I have the value of the variable but it's not a 'hard' number. We'll call the variable x.

I need to calculate how many columns I'll have if the columns and rows will be the same, or the columns will be 1 minus (floor) the number of rows.
If the variable x = 10 then the columns would be 3 and there would be 4 rows, the last row would only have a value in the first column.

How can I calculate for the number of columns I need given the variable x?
 
Mathematics news on Phys.org
Duh - floor(square root of x)
 
Thread 'Erroneously  finding discrepancy in transpose rule'
Obviously, there is something elementary I am missing here. To form the transpose of a matrix, one exchanges rows and columns, so the transpose of a scalar, considered as (or isomorphic to) a one-entry matrix, should stay the same, including if the scalar is a complex number. On the other hand, in the isomorphism between the complex plane and the real plane, a complex number a+bi corresponds to a matrix in the real plane; taking the transpose we get which then corresponds to a-bi...

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 68 ·
3
Replies
68
Views
11K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
553
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K