-
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
-
yuyinchuli
基于matlab的语音处理程序,可实现经过各种滤波器后的频谱图,幅度图等.(Matlab-based voice processing procedures, can be realized through a variety of filters after the frequency spectrum, range maps.)
- 2011-05-14 10:16:58下载
- 积分:1
-
UPML 2D TEmode
二维TE波传播的FDTD仿真,UPML边界条件(TE wave propagation in two-dimensional FDTD simulation, UPML boundary conditions)
- 2020-06-30 03:00:02下载
- 积分:1
-
example
用matlab编写的一个人机界面,具有读取文件功能,操作按钮功能等(A matlab GUI program which can read file, operating button act.)
- 2013-03-23 13:15:08下载
- 积分:1
-
Filtbank
计算声压级及滤波器设计的,具有很重要的作用( One-third-octave band frequency analyser)
- 2013-10-21 19:49:29下载
- 积分:1
-
GCP
GCP是地面控制点的缩写,主要是处理地面控制点的类,包括控制点的读取处理以及写出。(GCP is an acronym for ground control points, mainly handling ground control points, including read and write process control points.)
- 2014-02-25 11:53:44下载
- 积分:1
-
CFAR_even
从雷达目标接收的信号通常埋在
热噪声和杂波。正如杂波加噪声电源
不知道先验,固定的阈值检测方案不能
假警报才会应用于雷达回报
控制。(The signal received from a radar target is usually buried in
thermal noise and clutter. As the clutter-plus-noise power is
not known a priori, a fixed threshold detection scheme cannot
be applied to the radar return if the false alarm is to be
controlled.)
- 2012-10-29 15:30:38下载
- 积分:1
-
ica_basic_theory
program ica Iin basic and theory by matlab
- 2014-12-14 13:23:29下载
- 积分:1
-
test4
test car lane changing with matlab simulink based on fuzzy control test 4.
- 2015-01-26 02:37:17下载
- 积分:1
-
potential
Potential Equation for a Flow
- 2015-02-19 15:05:37下载
- 积分:1