-
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
-
MS_matlab
使用meashift方法做的平滑和分割算法,用matlab写的(Meashift methods make use of the smoothing and segmentation algorithm, written using matlab)
- 2007-10-17 19:29:45下载
- 积分:1
-
m_fh_simulatin_err_ratio
利用m序列生成跳频序列并用于跳频通信,并给出误码率曲线(Use of m sequences generated hopping sequence and used for frequency hopping communications, and give the bit error rate curve)
- 2021-04-01 20:59:07下载
- 积分:1
-
pufenxi
信号频谱分析的MATLAB实现程序
内附多个源代码,可作学习参考(Analysis of the signal spectrum to achieve the MATLAB program containing a number of source code, reference can be used for learning)
- 2009-05-02 12:29:01下载
- 积分:1
-
array
说明: matlab code for array
- 2011-03-22 00:52:05下载
- 积分:1
-
Monte-Carlo-simulation-Matlab-code
Monte Carlo simulation Matlab code
- 2011-05-15 06:35:51下载
- 积分:1
-
Demos
varios demos para sistema de optimización de antenas
- 2010-11-11 23:48:17下载
- 积分:1
-
seaclutter-suppression-for-HFSWR
海杂波抑制技术研究,对于学些海杂波建模的很有用(it is help for sea clutter suppression)
- 2013-11-17 16:30:43下载
- 积分:1
-
generation-fo-random-numbers
通信系统中,服从标准分布、正态分布、泊松分布和瑞利分布的随机数的生成(the genneration of the uniform distribution, Gaussian distribution, Rayleigh distribution and Possion distribution, in communication system)
- 2012-01-02 14:21:43下载
- 积分:1
-
quadrotor_dynamics
说明: 四轴飞行器Matlab仿真分析,涉及四轴飞行器主要部件如Motor,camera,电池等,分析包括稳定性、动力等(Four aircraft Matlab simulation analysis, involving Four major components of aircraft, such as Motor, camera, battery, etc., analysis, including stability, power, etc.)
- 2008-09-05 09:47:53下载
- 积分:1