MATLAB: Definition of Time

concatenatemergetime together

I have a file data with:
Column1: Year (2011)
Column2: Month (10)
Column3: Day (22)
Column4: Hour (10)
Column5: Minute (35)
Column6: Second (30)
These are "86400×1 double" so a lot of data.
I want to have a variable or another cell with TIME like:
YYYY.MM.DD HH.MM.SS (2011.10.22 10.35.30)
How could I concatenate or merge all elements?
I need to use it after that to find the DATE and TIME (X) in the database and to delete until the next (Y) value TIME. At the end I have to plot all and have an average of temperatures (The data has also some columns with temperatures)
Thank you

Best Answer

DateNumber = datenum([Y, M, D, H, MN, S])
So...
X = datenum(data(:,1:6))-min(datenum(data(:,1:6))); % Normalized time
Y1 = data(:,7);
Y2 = data(:,8);
X is time in terms of fraction of a day - to get X in terms of seconds, multiply by 24*60*60