-
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
-
adams
用四阶亚当斯显式公式求解常微分方程初值问题是一种比较有效的方法(Adams with the fourth-order explicit formula for solving ODEs is a more effective method)
- 2010-11-24 22:17:57下载
- 积分:1
-
5807_Simulink_tutorial
matlab simulink wind turbine with doubly feed induction generator
- 2015-03-23 09:38:57下载
- 积分:1
-
MAxinxiguji
MA(q)模型新息估计方法MATLAB例程(MA (q) model is estimated that the new method of income MATLAB routine)
- 2009-07-15 16:51:08下载
- 积分:1
-
PCA
带有数据的PCA程序,计算方差贡献率确定主元数,有T方和SPE图(PCA program with data, calculate the variance contribution rate to determine the number of principal, with a T square and SPE chart)
- 2020-12-01 23:39:26下载
- 积分:1
-
FSK-MATLAB-code
FSK调制解调MATLAB源代码FSK,很不错,值得看看(FSK modulation and demodulation MATLAB source code FSK, very good, worth a look)
- 2013-11-15 16:52:02下载
- 积分:1
-
Wavelet-
地震子波波形显示及一维地震合成记录,以雷克子波为例(Seismic Wavelet and synthetic seismogram)
- 2020-10-27 15:19:58下载
- 积分:1
-
基于遗传算法的BP神经网络优化算法
说明: 基于遗传算法的BP神经网络优化算法的MATLAB实现(MATLAB implementation of BP neural network optimization algorithm based on genetic algorithm)
- 2020-09-22 08:12:01下载
- 积分:1
-
naviga120203
惯导系统simulink仿真,功能设计的比较全面,可以再上面进一步修改。(Simulink simulation of the inertial navigation system, the functional design of a more comprehensive, you can then further modify the above.)
- 2012-04-16 21:30:32下载
- 积分:1
-
fourier_transfer
自己编写的傅里叶变换程序,属于作业范畴,首屏不高仅供参考(I have written Fourier transform falls within the scope of the job, the first screen for reference only)
- 2013-04-29 11:40:42下载
- 积分:1