-
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
-
LPC
说明: LPC系数构造声道函数
通过LPC系数构造声道函数,然后与FFT变换进行比较,看两者关系(LPC coefficients of structural channel function)
- 2010-04-06 14:58:16下载
- 积分:1
-
RemoveSpace
Remove Extra Spaces (Sometimes text values contain leading, trailing, or multiple embedded space characters, this function removes spaces from text except for single spaces between words)
- 2014-09-21 10:30:43下载
- 积分:1
-
matlabvideo
有关如何读取视频和进行帧差计算的源码,有参考意义(codes for video reading and frames calculation)
- 2011-11-28 01:09:08下载
- 积分:1
-
bagPSO
matlab 用PSO 解决背包问题 (matlab solve the knapsack problem with PSO)
- 2010-10-20 19:35:06下载
- 积分:1
-
matlab-master
this simulation is based on capacity enhancement using waterfilling
- 2014-09-08 21:45:03下载
- 积分:1
-
speech_oscilloscope_2
Speech oscilloscope using matlab
- 2013-11-12 14:44:48下载
- 积分:1
-
支持向量机SVM和核函数的matlab程序集
说明: 支持向量机SVM和核函数的MATLAB程序集(MATLAB SVM RBF SIGMOD)
- 2020-06-23 10:00:01下载
- 积分:1
-
emdexample
example of using emd
- 2007-12-12 14:18:51下载
- 积分:1
-
voicebox
MATLAB的语音工具箱的附加文件,和VOICEBOX一起使用(MATLAB toolbox add voice files, and use VOICEBOX)
- 2009-06-01 12:45:48下载
- 积分:1