How can I filter a date column so it just considers every 5 minutes observations for each day?
Mostra commenti meno recenti
Hi everyone!
I have the next column where each number represents the date ('yyyymmddHHMM' in this order):

As you can see from the image here I have one year (1990), one month (january), two days (02 and 03) and different hours with one minute distance.
What I wanted to do is to filter this column for every 5 minutes. First starting every day in the first minute (10:00 vs 10:05) and continuing with the second minute (10:01 vs 10:06) and so on.
I have used the next comand to filter my data:
C5= cell(length(C)-2,1);
for ii=1:length(C5)
C5{ii} = C(ii:5:end)';
end
Obtaining the next results:

But as you can see my command is not restarting the 5 minutes jump when is another day and therefore the columns are "outdated" for my purposes.
For example, the first column form the last image should look this:

How can I modify my code so it restarts the 5 minutes jumps when is another day?
Thanks a lot for your help!
AngelaT
2 Commenti
Azzi Abdelmalek
il 30 Apr 2016
Posting images is not useful for someone who wants test your data. It easier for everyone if you post your data with the format you are using in Matlab (just copy and paste your data), we have not to ask if it's a cell array containing double or char variables.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Time Series Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!