I need to solve a problem like below. I have a matrix with 1 column, with unknown number of rows. I have a random number for number of row, and I need to find out that which group is this row in.
Imagine I have this data and I need to found out that row number=10 is in which group ?
My main concern is since I do not know how many groups do I have (inittially unkown) , how should I modify my code?
disp ("group 2")
Thanks in advance for help