-
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
-
DigitalWirelessCommunicationsCourseOutline
Digital Wireless Communication
- 2010-08-24 20:50:45下载
- 积分:1
-
seek
说明: 乘积的最后三位的值只与乘数和被乘数的后三位有关,与乘数和被乘数的高位无关,利用此来求尾数(The last three values of the product only with the multiplier and the multiplicand on the back three, with a high multiplier and the multiplicand has nothing to do, take advantage of this to seek mantissa)
- 2010-03-24 21:16:03下载
- 积分:1
-
matlab-fuhaoyunsuan
该PPT详细介绍了MATLAB的符号运算(the PPT introduced MATLAB symbolic operation)
- 2007-04-12 17:35:47下载
- 积分:1
-
CPPhuatu
这是一个鼠标程序,按Ctrl键同时按鼠标左键画圆,按shift同时按鼠标左键画矩形(This is a mouse program, press the Ctrl key while pressing the left mouse button circle, press shift while pressing the left mouse button draw a rectangle...)
- 2013-11-18 21:59:19下载
- 积分:1
-
5dec
北大高慧璇版《应用多元统计分析》第5章5判别分析MATLAB编程源码(Applied Statistical Analysis )
- 2011-12-01 09:06:30下载
- 积分:1
-
decimate
MATLAB 数字信号处理工具箱中decimate函数c语言实现(MATLAB Digital Signal Processing Toolbox decimate function c language)
- 2013-11-05 14:13:08下载
- 积分:1
-
variogramfit
Scaling parameters for correlation - only used in turbulent
correlation. A scalar or a vector with length equal to the
dimension of the mesh points(Scaling parameters for correlation- only used in turbulent
correlation. A scalar or a vector with length equal to the
dimension of the mesh points)
- 2015-04-06 10:22:13下载
- 积分:1
-
airquality
运用MATLAB程序计算大气空气质量预测预报,运用前一天的气象数据预测未来情景的空气质量。例子给出了输入文件和源程序。(Using MATLAB program to calculate the Air Quality forecast, the day before the use of meteorological data to predict future scenarios of air quality. Examples given in the input file and the source.)
- 2015-07-15 16:26:39下载
- 积分:1
-
yichuan_matlab
自编matlab遗传算法代码,希望对大家有所帮助(Self matlab genetic algorithm code)
- 2013-04-22 20:52:30下载
- 积分:1