0

I have a specific matrix for one some signal on different times (first column in matrix shown time).

data [9*2 matrix] =

    1     2     
    3    13
    3    2.5
    9    1
    9    5
    9    7
    11   1
    11   2
    13   3                 

some time in the first column is unique, so this unique value should be in outputted matrix exactly. for the non-unique value we should calculate average of values in second column, (i.e: for example for 9 we have three values in second column 1+5+7 and get average of them: 4.3) as follows:

data [9*2 matrix] =

    1     2     
    3    7.75
    9    4.3
    11   1.5
    13   3                 

How I can get this outputted matrix for any arbitrary input matrix?

0 Answers0