-
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
-
matlab_rs232
matlab下利用s-function实现rs232编码、解码及通讯的实例程序。需要在matlab下利用mex编译使用(参见s-function用法)(matlab using s-function to achieve rs232 encoding, decoding and communication procedures of the examples. Need to use matlab using mex compiler (see the use of s-function))
- 2009-06-13 23:14:43下载
- 积分:1
-
Matlab
说明: 较完全的Matlab通信系统仿真程序。。。。。。。。(More complete communication system simulation program Matlab. . . . . . . .)
- 2010-04-11 12:59:05下载
- 积分:1
-
NelderMead_Powell
Numerical optimization, NeaderMead Powell method
- 2010-05-12 14:35:22下载
- 积分:1
-
(Thomson)-MATLAB-Programming-for-Engineers-(2001)
basic matlab book in which everything will be explained in well manner.
- 2011-08-09 17:41:51下载
- 积分:1
-
Alamoutis
空时分组码中基本的Alamoutis算法,对比发射分集和不分集的情况下误码性能(Space-time block codes in the basic Alamoutis algorithm error performance, compared to the case of transmit diversity and non-diversity)
- 2013-05-14 14:04:11下载
- 积分:1
-
inagersh
多变量频域设计 绘制逆奈奎斯特曲线的函数的改进(multivariate frequence)
- 2012-01-14 10:28:52下载
- 积分:1
-
carpark
A car park problem wrote in defuzz system
- 2010-12-03 19:09:51下载
- 积分:1
-
step
tracking of step trajectory bu wheeled mobile robot
- 2014-11-23 00:34:08下载
- 积分:1
-
egdtt
image edge detect funtion for matlab
and example image
POSTECH
- 2009-12-10 03:14:43下载
- 积分:1