-
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
-
wigb
画地震剖面的,可以在MATLAB中自由使用(Painting seismic profiles can be freely used in the MATLAB)
- 2007-12-19 21:44:38下载
- 积分:1
-
pid
先进pid控制及其matlab仿真电子书籍以及源代码(Advanced pid control matlab simulation of electronic books and source code)
- 2012-07-03 22:28:46下载
- 积分:1
-
nn
说明: MATLAB神经网络分类示例,是一种二分类示例,MATLAB2014实现(MATLAB neural network classifier example, is a two classification example, MATLAB2014 achieve)
- 2014-10-24 14:50:21下载
- 积分:1
-
cspline
通用三次样条插值函数,可求解离散点的三次样条插值(General cubic spline interpolation function, can solve the discrete points of the cubic spline interpolation)
- 2020-09-18 12:07:58下载
- 积分:1
-
Dynprog
动态规划算法的顺序(前向求最小值)算法的matlab实现以及一个算例,还有一篇参考pdf文献,适合初学者,有我个人的一点注释(Dynamic programming algorithm for the sequence (prior to seeking the minimum value) algorithm matlab to achieve, as well as a numerical example, there is a reference pdf document, suitable for beginners, there are my personal notes that)
- 2008-06-17 16:41:21下载
- 积分:1
-
hundun
混沌阵子的simulink仿真程序,调节参数可以共振。(hundun,sinmulink)
- 2009-06-03 09:30:16下载
- 积分:1
-
darkchannelpriordehazing
基于暗原色先验的单一图像去雾算法
香港中文大学的一篇论文(dark channel prior dehazing
single image dehazing using dark channel prior)
- 2021-04-16 17:58:54下载
- 积分:1
-
PVdiodeModelRsRsh
PV diode Model Rs Rsh
- 2013-12-05 16:14:11下载
- 积分:1
-
MATLAB
MATLAB教程,感兴趣的朋友可以一看,讲的还算比较基础。(MATLAB learning)
- 2015-04-20 14:04:15下载
- 积分:1