-
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
-
Matlab_learning_01
learning matlab software for simulations
- 2010-07-29 14:56:19下载
- 积分:1
-
quadrado
Cancelamento de ruido acustico
- 2010-12-02 07:32:54下载
- 积分:1
-
endpointdetection
语音端点检测及其在Matlab中的实现语音端点检测及其在Matlab中的实现语音端点检测及其在Matlab中的实现(Speech endpoint detection and its implementation using matlab)
- 2009-12-21 16:07:35下载
- 积分:1
-
combining-work
removal of powerline interference in ecg
- 2011-02-16 13:26:12下载
- 积分:1
-
bp
说明: 神经网络仿真的相关资料,如果下载的话请回复吧(very good,if you want more,please mail me)
- 2009-07-22 19:05:46下载
- 积分:1
-
LightCompensate
基于matlab实现的图像的光照补偿程序,可以有效提高图像的对比度(Matlab implementation of image-based illumination compensation program that can effectively improve the contrast of the image)
- 2013-07-12 22:07:31下载
- 积分:1
-
元胞自动机交通流模拟
利用元胞自动机对交通流进行模拟,包括单双车道,还有换道规则。
- 2022-02-05 17:47:04下载
- 积分:1
-
matlabhuitu
matlab绘图方面的很好的幻灯片,内容比较实用,有兴趣的可以看看。(matlab mapping good slides, the content more practical, interested can look at.)
- 2008-07-11 15:56:16下载
- 积分:1
-
基于半空间的子空间算法
基于子空间算法的ofdm系统半盲估计,希望对信道估计的同仁有帮助!-subspace algorithm based on the semi-blind system ofdm estimate, and I hope to channel estimation colleagues help!
- 2023-01-31 21:05:03下载
- 积分:1