-
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
-
Hermite_Spline
进行分段三次Hermite插值和分段三次Spline插值,比较F-C取导数方法所得到期收益率曲线逼近中债结算公司的到期收益率曲线的效果的程序(Hermite interpolation for sub-three and three sub-Spline interpolation, comparing FC take derivative curve approximation method, due in settlement of debts due the company s procedures for the effect of yield curve)
- 2008-01-02 16:02:14下载
- 积分:1
-
lixiangzuixiaopai
计算机控制理想最小拍控制器的设计实例,带有零阶保持器的对象。(Ideal for computer control of minimum film controller design example, with zero-order to maintain the target device.)
- 2009-05-02 10:12:57下载
- 积分:1
-
DM6_decision_tree
实现ID3决策树算法,可以实现基本眜分类,最终的决策树是以结构体存放的(ID3 decision tree)
- 2014-08-29 10:06:01下载
- 积分:1
-
hdhx2
无多普勒频移的海底混响单元散射模型(matlab)( the seafloor reverberation unit scattering model without Doppler frequency shift)
- 2012-09-12 18:26:55下载
- 积分:1
-
inverter_svpwm_threelevel_Add_BusBalance
说明: 三电平逆变器的建模,可以用于二极管钳位型三电平主电路的设计,采用的是SVPWM算法(Modeling of three level inverter)
- 2021-04-06 00:25:18下载
- 积分:1
-
GettingStarted
Getting Start LPC 1768 LandTiger
- 2014-01-10 08:47:27下载
- 积分:1
-
Bloeexham123
Physical system model of a hydraulic-electric energy storage device for hybrid automotive
- 2010-10-26 06:53:36下载
- 积分:1
-
Movement-target-detection
运动目标检测的程序是有关车辆的,其中涉及到几种方法,有一定的参考价值。(Sports target detection program about the vehicle,reference to several methods and it is worth reading.)
- 2012-05-04 10:05:03下载
- 积分:1
-
Rundeopt
matlab differerntial evolution
- 2011-07-21 22:18:44下载
- 积分:1