日志
-
- 分享
matlab中任意两个日期间的月数months
-
kongfeng0824 2013-11-21 19:32
-
Syntax MyMonths = months(StartDate, EndDate, EndMonthFlag) ExamplesMyMonths = months('may 31 2000', 'jun 30 2000', 1) MyMonths = 1 MyMonths = months('may 31 2000','jun 30 2000', 0) MyMonths = 0 Dates = ; MyMonths = months(Dates, 'jun 30 2002') MyMonths = ...
-
个人分类: Matlab Study|127 次阅读|0 个评论
-
- 分享
matlab中的月函数month
-
kongfeng0824 2013-11-21 19:23
-
Syntax = month(Date) = month(Date, F) Description = month(Date) returns the month in numeric and string form given a serial date number or a date string. = month(Date, F) returns the day of the of the month, given a serial date number or date string, in a specified date format. ...
-
个人分类: Matlab Study|118 次阅读|0 个评论
-
- 分享
matlab中的分钟函数minute
-
kongfeng0824 2013-11-21 17:42
-
Syntax Minute = minute(Date) Description Minute = minute(Date) returns the minutegiven a serial date number or a date string. Examples Minute = minute(731204.5591223380) or Minute = minute('19-dec-2001, 13:25:08.17') returns Minute = ...
-
个人分类: Matlab Study|98 次阅读|0 个评论
-
- 分享
matlab中的查找最后一周时间函数lweekdate
-
kongfeng0824 2013-11-21 17:39
-
Syntax LastDate = lweekdate(Weekday, Year, Month, NextDay) Example 1 . To find the last Monday in June 2001 LastDate = lweekdate(2, 2001, 6); datestr(LastDate) ans = 25-Jun-2001 Example 2 . To find the last Monday in a week that also contains a Friday in June 2001 LastDate = lwee ...
-
个人分类: Matlab Study|161 次阅读|0 个评论
-
- 分享
matlab中的小时函数hour
-
kongfeng0824 2013-11-21 17:31
-
hour Hour of date or time Syntax Hour = hour(Date) Description Hour = hour(Date) returns the hour of theday given a serial date number or a date string. Examples Hour = hour(730473.5584278936) or Hour = hour('19-dec-1999, 13:24:08.17') returns Hour ...
-
个人分类: Matlab Study|119 次阅读|0 个评论
-
- 分享
matlab中每个月的最后一天函数eomdate
-
kongfeng0824 2013-11-21 17:25
-
Syntax DayMonth = eomdate(Date) DayMonth = eomdate(Year, Month) Examples DayMonth = eomdate(2001, 2) DayMonth = 730910 datestr(DayMonth) ans = 28-Feb-2001 Year = ; DayMonth = eomdate(Year, 2) DayMonth = 731275 731640 732006 732371 datestr(DayMon ...
-
个人分类: Matlab Study|405 次阅读|0 个评论
-
- 分享
matlab中的时间函数day
-
kongfeng0824 2013-11-21 17:19
-
Syntax DayMonth = day(Date) DayMonth = day(Date, F) Description DayMonth = day(Date) returns the day of themonth given a serial date number or date string. DayMonth = day(Date, F) returns the day ofthe of the month, given a serial date number or date string, in aspecified dat ...
-
个人分类: Matlab Study|137 次阅读|0 个评论
-
- 分享
matlab中的时间函数datevec
-
kongfeng0824 2013-11-21 17:17
-
Syntax DateVector = datevec(DateNumber) example DateVector = datevec(DateString) DateVector = datevec(DateString,formatIn) example DateVector = datevec(DateString,PivotYear) DateVector = datevec(DateString,formatIn,PivotYear) example = datevec( ___ ) example Date ...
-
个人分类: Matlab Study|453 次阅读|0 个评论
-
- 分享
matlab中的时间函数today
-
kongfeng0824 2013-11-21 17:06
-
Syntax Datenum = today Description Datenum = today returns the current date as a serial date number. ExamplesDatenum = today returns Datenum = 730695 on July 28, 2000.
-
个人分类: Matlab Study|194 次阅读|0 个评论
-
- 分享
matlab中的时间函数now
-
kongfeng0824 2013-11-21 17:04
-
Syntax t = now Description t = now returns the currentdate and time as a serial date number. To return the time only, use rem(now,1).To return the date only, use floor(now). Examples t1 = now, t2 = rem(now,1) t1 = 7.2908e+05 t2 = ...
-
个人分类: Matlab Study|92 次阅读|0 个评论