I have a matrix with several columns and rows. I need to find the average of particular rows in one column depending on if the value in the row for another column is 1 or 2. So for example, in the following matrix:
1 12 13 24 25 1
I need to calculate the average of 1, 2 and 5 giving me 3.67. If possible, I also need to check the value in each row for an additional column as well.
Thank you so much!
Best Answer