# MATLAB: How to extract rows by date

extract data with same variables

say I have a table A
``18-Dec-2015 42.3000   29.9000    7.300018-Dec-2015 37.3000   30.1000   13.400018-Dec-2015 39.1000   30.0300    6.500018-Dec-2015 42.3000   29.9000    7.300019-Dec-2015 37.3000   30.1000   13.400019-Dec-2015 39.1000   30.0300    6.500020-Dec-2015 42.3000   29.9000    7.300020-Dec-2015 39.1000   30.0300    6.500020-Dec-2015 37.3000   30.1000   13.4000``
I have almost 3000 days to do. How could I use a loop to extract rows by time and do some calculation separately? Thanks in advance!!! I tried ismember and the following one but neither works.
``for i = (:,1)if A(i,1)=A(i+1,1)C=A(i,:)...``

``>> AA =9×4 table     Time       Var1    Var2     Var3  __________    ____    _____    ____  2015/12/18    42.3     29.9     7.3  2015/12/18    37.3     30.1    13.4  2015/12/18    39.1    30.03     6.5  2015/12/18    42.3     29.9     7.3  2015/12/19    37.3     30.1    13.4  2015/12/19    39.1    30.03     6.5  2015/12/20    42.3     29.9     7.3  2015/12/20    39.1    30.03     6.5  2015/12/20    37.3     30.1    13.4``
``>> A = table2timetable(A);>> AA =9×3 timetable     Time       Var1    Var2     Var3  __________    ____    _____    ____  2015/12/18    42.3     29.9     7.3  2015/12/18    37.3     30.1    13.4  2015/12/18    39.1    30.03     6.5  2015/12/18    42.3     29.9     7.3  2015/12/19    37.3     30.1    13.4  2015/12/19    39.1    30.03     6.5  2015/12/20    42.3     29.9     7.3  2015/12/20    39.1    30.03     6.5  2015/12/20    37.3     30.1    13.4``
``>> retime(A,'daily','mean')ans =3×3 timetable     Time        Var1      Var2      Var3   __________    ______    ______    ______  2015/12/18     40.25    29.983     8.625  2015/12/19      38.2    30.065      9.95  2015/12/20    39.567     30.01    9.0667``