Definition of Time
2 次查看(过去 30 天)
显示 更早的评论
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 "86400x1 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
采纳的回答
Dr. Seis
2012-3-7
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
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!