-
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
-
05
说明: matlab编程,很好的学习资料,我看过好几遍了,非常不错。(matlab programming, good learning materials, I have read several times, and very good.)
- 2009-10-12 09:42:39下载
- 积分:1
-
GPSsimulink
基于MATLAB编程的卫星轨道动态仿真,利用M文件进行编程实现了三维立体动画的卫星动态显示(Dynamic simulation based on MATLAB programming, satellite orbit, the M-file programming a dynamic display of three-dimensional animation of the satellite)
- 2020-11-17 20:29:39下载
- 积分:1
-
shuizhifenxi
MATLAB语言编写的一个水质分析的程序,应用BP神经网络思想对水质进行分类。(A water quality analysis MATLAB language program, BP neural network to classify the water quality of thought.)
- 2016-03-09 17:30:31下载
- 积分:1
-
MATLAB_Programming_LMS_Adaptive_Equalizer
一个MATLAB程序,用以实现基于最小均方误差算法的自适应均衡器,通常可以直接应用在数字通信系统中(A MATLAB program used to implement an LMS adaptive equalizer which can be directly applied in the digital communication systems)
- 2010-02-07 16:18:25下载
- 积分:1
-
xuliebianhuan
用 matlab 实 现 信 号 的 相 关 变 换(Associated with matlab for signal transformation
)
- 2011-10-09 09:53:51下载
- 积分:1
-
SSC_1.0
Sparse Subspace clustering, an algorithm which is useful for subspace segmentation and motion tracking--
- 2014-02-03 13:26:53下载
- 积分:1
-
matlabcoding
MATLAB是一个强大的工具,这份MATLAB入门级材料有助于MATLAB初学者更好的更快的学好MATLAB(MATLAB is a powerful tool, this entry-level material MATLAB help MATLAB beginners learn faster and better MATLAB)
- 2009-05-06 11:52:20下载
- 积分:1
-
dsk02n
《MATLAB及在电子信息课程中的应用》一书中所有例题和习题的MATLAB源程序(MATLAB and electronic information in the application of the curriculum," a book of all the MATLAB examples and exercises source)
- 2009-07-01 11:32:33下载
- 积分:1
-
GenderClassification8
The paper for Gender Classification
- 2010-09-14 22:40:26下载
- 积分:1