If I have the following matrix for example: enter image description here
The values in the tables are an index of the elements.
for (int count =0; index<9; count++) {
//row = function of index
//column = function of index
}
In other words, how can I get the row and column from the index of an upper triangle of a matrix if it was ordered as in the photo.
I've been thinking about this for a while but I can't seem to figure it out!