Dear all,
I am trying to code a Macro which utilizes the Direct Clustering Algorithm.
As input, I have a binary matrix.
For example:
[note that the first row and column are headers]
Now, the rows of the matrix are interpreted as a binary value, which then should be sorted descendingly:
First: Sort rows
The row wise sorted matrix then should be sorted columnwise, also descendingly.
What I have so far is the preperation to have arrays with the binary values stored:
What now puzzles me is: how to I sort an array and efficiently save its index, so I can swap the rows and columns? And also, if the problem gets bigger, lets say a matrix with 100+ columns and rows, does my way of concatenating the cells still work? I am already getting overflow errors when I use integers for the arrays arraybinC and arraybinR, I hope double arrays have enough storage...
Maybe someone can help me, that would be aweseome
Please find a sample attached. (in the first sheet there is a sample problem, in the second there is how I imagine the code should work like)
BTW: If someone knows the last step, how to determine cluster and colour the matrix accordingly, please feel free to tell me
As of now, I am trying to get the matrix first 
Thank you so much and have a nice weekend!
Bookmarks