MATLAB: Managing year and months time series i have dataset in following formay M = [2015 1 5 ; 2015 1 6 ; 2015 2 6 ; 2014 3 6 ; ] split like this A = [2015 1 5 ; 2015 1 6 ; ] B = [2015 2 6 ;] C = [2014 3 6 ] Best Answer doc datetimeNow:Mdt = datetime(M) Related SolutionsMATLAB: Calculate mean from daily to monthly values. dn=datenum('01-01-2008','dd-mm-yyyy'):datenum('31-12-2014','dd-mm-yyyy')swh=randi(10,numel(dn),1)[y,m,d] = datevec(dn);a=[y' m' d'][ii,jj,kk]=unique(a(:,1:2),'rows')out=accumarray(kk,(1:numel(kk))',[],@(x) mean(swh(x))) MATLAB: Hwo to arrange certain rows of a matrix into cell array A=[1 2 0 12;2 3 1 54;7 8 2 12;2 10 3 12;0 1 4 54;1 1 4 77][ii,jj,kk]=unique(A(:,4))out=accumarray(kk,1:numel(kk),[],@(x) {A(x,:)})celldisp(out) Related QuestionHow to divide a matrix by its columnsMonthly average of the variablesRetrieving minimum values for parts of a matrixBreak a big matrix into cell array based on repetitive number in one of the matrix columnsFind dublicated value in a column and return the whole rowComparing two matrices and obtain the un-repeated rows
Best Answer