So I have to sets of data one represents wind speed, and the other represents radar rain data.
My wind data is imported from excel and consists of a column of dates and the the remaining colums are values of wind speeds for different stations at these date times.
The radar data is a hdf file that has been converetd into rain intensity in another function.
Each set of data is in time increments of 5 minutes beginning September 2020.
E.g. first 4 sets of data :
- '01-Sep-2020 00:00:00'
- '01-Sep-2020 00:05:00'
- '01-Sep-2020 00:10:00'
- '01-Sep-2020 00:15:00'
I have looking to add a line that will compare the date/time values of the wind data to the date/time values of the radar data for each time point.
When the code finds a match, it can then be used in two other functinos I have.
A suggested start is
for i = 1:length(WindDatetime)
if RadarDatetime == WindDatetime(i)
then the file of interest == i
i =i +1;
However, this is not working for me.
I will insert the last part of my code that turns the date time vectors into a table of numbers like so :
2020 9 1 0 0 0
2020 9 1 0 5 0
2020 9 1 0 10 0
windtime = windfive.date;
idx = ismember(windtime,timestampDT);
Winddata = datevec(windtime);
Radardata = datevec(timestampDT);
Another very useful thing to me would be if anyone knows a simple way of calling out time data so that I can use it.
For example if I would like to view the data between
'08-Sep-2020 23:55:00' and '17-Sep-2020 17:45:00'
is there a way of doing this?