-
DateConvert
DateConvert:简单而快速的日期转换
DateConvert转换DATESTR(0)格式的日期向量或序列号和日期向后。
Matlab的DATENUM,DATEVEC和DATESTR接受各种不同意见,但结果他们是缓慢的。如果输入格式正是众所周知,转换可以更快:
DATENUM( 17 - 10 - 2009 11时08分23秒 ):2.97秒
DateConvert( 17 - 10 - 2009 11时08分23秒 , 号码 ):0.039秒
=>“1.3%(1000环,1.5GHz的奔腾- M的,利用Matlab 7.7)
DateConvert不*不*验证作为Matlab的日期函数输入日期:
DATEVEC( 32 - 2 - 2008 25:62:63 )的答复[2008 3 4 2 2 7]
DateConvert( 32 - 2 - 2008 25:61:67 , 载体 )的答复[2008 2 32 25 61 67]!
因此DateConvert几乎微不足道,但对速度进行了优化。我需要时间排序200 000邮票,并从217个减少到11秒的时间。
请运行单元测试TestDateVec检查的有效性和速度。
测试:利用Matlab 6.5,7.7,7.8,winxp的,32位。
纯Matlab代码,所以兼容性的MacOS,Linux操作系统,64位预期。
英语月份名称是必要的。(DateConvert: Simple but fast date conversion
DateConvert converts the DATESTR(0) format to a date vector or serial date number and backwards.
Matlab s DATENUM, DATEVEC and DATESTR accept a variety of inputs, but in consequence they are slow. If the input format is exactly known, the conversion can be much faster:
DATENUM( 17-Oct-2009 11:08:23 ): 2.97 sec
DateConvert( 17-Oct-2009 11:08:23 , number ): 0.039 sec
=> 1.3 (1000 loops, 1.5GHz Pentium-M, Matlab 7.7)
DateConvert does*not* validate the input date as Matlab s date functions:
DATEVEC( 32-Feb-2008 25:62:63 ) replies [2008 3 4 2 2 7],
DateConvert( 32-Feb-2008 25:61:67 , vector ) replies [2008 2 32 25 61 67] !
So DateConvert is nearly trivial, but optimized for speed. I needed it for sorting 200 000 time stamps and reduced the time from 217 to 11 sec.
Please run the unit-test TestDateVec to check validity and speed.
Tested: Matlab 6.5, 7.7, 7.8, WinXP, 32bit.
Pure Matlab code, so compat)
- 2010-07-05 11:59:46下载
- 积分:1
-
paretosetV4
matlab中的paretoset工具集(a usually matlab paretoset tool)
- 2010-08-29 10:28:39下载
- 积分:1
-
fengzhidingjie
分支定界 MATLAB编程 分支 定界 剪枝 取整数解(Branch and bound MATLAB programming branch and bound pruning rounded solution)
- 2013-12-20 01:18:18下载
- 积分:1
-
rs1
调制与解调用于随机共振的微弱周期信号检测,随机共振经典论文(failed to translate)
- 2013-05-07 17:11:11下载
- 积分:1
-
hazaboduixiao_fangzh
雷达目标检测方法之一的海杂波对消法的仿真例子(Radar target detection in sea clutter simulation example for Consumer Law)
- 2014-02-20 18:41:13下载
- 积分:1
-
BasedonMATLABpronunciation
基于MATLAB的语音信号的调制和解调,包括画出各个阶段的语音时域和频域图形(Matlab-based voice signal modulation and demodulation, including draw stages of time domain and frequency domain speech)
- 2010-06-06 16:02:33下载
- 积分:1
-
cdma
CDMA multi-user communication
- 2011-01-12 01:44:58下载
- 积分:1
-
spline238388388
该程序是用MATLAB对SPLINE做的编程,对大家有所帮助,希望以后多多支持(that the procedure was used to SPLINE do MATLAB programming, we will help, hope that the generous support)
- 2007-04-10 18:19:59下载
- 积分:1
-
Warshall-Floyd
Warshall-Floyd 算法的matlab例程,Warshall-Floyd用于寻找两点之间的最短路,很简单,可以快速了解该算法。(The algorithm of Warshall-Floyd, Matlab routines, of Warshall-Floyd, used to find the shortest path between two points is very simple, you can quickly understand the algorithm.)
- 2012-06-05 10:22:40下载
- 积分:1
-
loglsa
finding aprox. function by the method of least squares for y = a + blnx
- 2011-05-02 20:27:53下载
- 积分:1