-
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
-
fig10_5
圆阵干涉方向图,电源干扰,测向,纠错,相位补偿(Circular array interferometer pattern, power interference, direction finding, error correction, phase compensation)
- 2013-09-09 22:57:22下载
- 积分:1
-
略谈matlab中S函数的概念及使用_files
MATLAB s函数编程实例 可以让新手更好理解和入门,学习MATLAB的高级函数编程(MATLAB s function programming example can help newcomers better understand and get started, learn advanced function programming of MATLAB)
- 2020-06-28 13:00:02下载
- 积分:1
-
yuyinlvbo
matlab对语音信号滤波,并比较滤波前后的音效。(matlab on the voice signal filtering, and compare the sound before and after filtering.)
- 2008-01-15 23:13:33下载
- 积分:1
-
MATLAB_Books_Collection_02
Matlab collected books for many fields
- 2010-05-12 16:13:00下载
- 积分:1
-
matlab中的小波熵程序
时间序列根据小波熵算法进行分段,以达到降维的目的(The time series is segmented according to the wavelet entropy algorithm)
- 2017-07-22 16:45:30下载
- 积分:1
-
cantilever-beam-master
说明: 绝对节点坐标法matlab程序,针对大变形,大转角问题(Matlab program of absolute node coordinate method)
- 2020-10-11 16:47:33下载
- 积分:1
-
identwedi
this code is used to generate function in discrete model using adaptive neural network algorithm
- 2012-08-07 12:21:37下载
- 积分:1
-
circulo_cuad_trian
generacion de figuras en matlab
- 2013-05-15 21:54:33下载
- 积分:1
-
s_xy705491
参考外国文献,通过MATLAB程序编写了以两个简单的tDJyUc映射构造一个双混沌互扰 YOzmlLR系统,提出了基于双混沌互扰系统的无线加密算法,具有防窃听的能力,调试无错误。(References to foreign literature, through MATLAB programming the tDJyUc with two simple mapping to construct a mutual interference YOzmlLR dual chaotic systems is proposed based on the wireless encryption algorithm dual chaotic mutual interference system has the ability of anti-wiretapping, debugging errors. )
- 2016-01-16 20:50:12下载
- 积分:1