I have a 3608x5 matrix which is year-month-date-time-energy at respective columns, where there are multiple datapoints every day. I have extracted the maximal values for one day manually placing the limits but want to extract the time of these values without getting a value from another day.
In this example I'm trying to get the timestamps in 8th of august but it doesn't work.
matrix=[year,month,date,time,energy]
max_day= [max energy consumption during a day]
for i=1:1:size(max_day)
time(i)=matrix(find(matrix(:,5)==max_day(i) & matrix(:,2)==8),4)
end