-
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
-
roughsetattributioncut
粗糙集约简的matlab算法,包含了基本的约简算法(Rough Set Theory and matlab algorithm, including the basic reduction algorithm)
- 2010-10-14 10:11:01下载
- 积分:1
-
rayleigh-PSK
在瑞丽衰落加高斯白噪声信道上进行的BPSK调制代码,代码解释详细,非常适合初学者(Decline in Ruili plus white Gaussian noise channel for the BPSK modulation code, the code to explain in detail, very suitable for beginners)
- 2011-06-07 19:57:17下载
- 积分:1
-
matlab-QLEARNING
模拟机器人路径规划,采用强化学习中的Q学习算法来实现,最后会返回机器人选择路径的坐标位置(code for path searching)
- 2016-08-30 15:36:54下载
- 积分:1
-
元胞自动机
说明: 学习CA的matlab实现,正是由于元胞状态的改变使微观组织发生着变化,而元胞状态的改变是基于具体的形核和生长以及捕捉规则,这些规则正是元胞自动机模型的核心,根据结晶过程中的晶粒形核和生长的物理机制建立元胞自动机模型是准确模拟晶体组织的关键。(learn the matlab come true of CA)
- 2021-03-24 21:27:54下载
- 积分:1
-
DvHop
Matlab implementation for DVHOP protocol
- 2015-02-20 02:23:20下载
- 积分:1
-
KKF
说明: 今天好心情,搞了几个小程序,大家分享一下(A good mood today, engaging in several small programs, we share)
- 2008-11-19 10:00:43下载
- 积分:1
-
delay_test
Simulink中延时模块、乘积模块、常数模块、示波器模块等使用例子,可以直接运行,自己编写的。(delay module, product module, constant modules, oscilloscope module usage example in Simulink, can be directly run, written by myself)
- 2013-08-26 19:28:47下载
- 积分:1
-
FSK
利用MATLAB实现对频率调制信号时域和频域的仿真,采样点为10240。(Frequency modulation signal)
- 2012-11-02 10:10:00下载
- 积分:1
-
transient_simulation
电力双机系统暂态仿真程序,含派克变换和绘图子程序,可供参考。(Dual power system transient simulation program, with Parker and graphics transform subroutine is available for reference.)
- 2011-08-08 23:16:54下载
- 积分:1