Separate datasets into months
显示 更早的评论
Hello,I have the Data matrix (1X1744) which contains values for two years (2014-2015) and Time (1X1744) is datetime contains the corresponding dates with hours for the values found in Data matrix. My question is: How can I separete the data into months? That is, to have 12 matrices, one for each month in which the valuesfrom each year will be found and another 12 matrices in which there will be the corresponding dates with hours. Your help is important !!!
Below is a piece of code with the data.
[~,~,ALL_Data]=xlsread('Data.xlsx',"Data");
Data=cell2mat(ALL_Data(2:1745,3))'; % 1X1744 douple
Time_Hour_Data=datetime(ALL_Data(2:1745,2),'InputFormat','dd/MM/yyyy HH:mm:ss')'; % 1X1744 datetime
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!