-
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
-
arclengthwew
The arclength of a general curve in 2 or more dimensions, using discrete points along the curve
- 2010-11-11 22:08:13下载
- 积分:1
-
beifener
自己毕业设计一些收集和做的一些simulink模型及源码,希望对大家有帮助(Graduated from the design of their own collection and do some simulink model and source, I hope all of you help)
- 2009-05-09 12:45:40下载
- 积分:1
-
Volumization
说明: 采用MATLAB编写的最新三维数据图形界面,运用GUI编程,输入函数名:volumization (data, n )即可。其中DATA的格式为:[n x m x p];n表示显示方式: 1 - all, 2 - every second, 3 - every third。
(MATLAB prepared using the latest three-dimensional data graphical interface, the use of GUI programming, enter the function name: volumization (data, n) can be. DATA format in which: [nxmxp] n that display: 1- all, 2- every second, 3- every third.)
- 2008-09-10 11:46:21下载
- 积分:1
-
Pegaso
[Numerical analysis]_ This algorithm computes the root of a function by the Pegaso method.
- 2014-08-08 11:07:01下载
- 积分:1
-
Matlabcodes
The best MATLAB programs out there
- 2014-10-02 23:00:18下载
- 积分:1
-
FuzzyModelReferenceLearningControlSystem
Fuzzy Model Reference Learning Control (FMRLC) System
- 2010-07-09 13:20:40下载
- 积分:1
-
block
图像分块,可以按照规定块数分块。用的是matlab中floor函数(image block)
- 2015-07-02 10:18:40下载
- 积分:1
-
PMSM_weakflux
说明: 永磁同步电机的弱磁控制,使电机进入弱磁区域,达到提高转速的效果。(Flux weakening control of permanent magnet synchronous motor, available)
- 2020-05-05 22:30:35下载
- 积分:1
-
tfrstft
短时傅里叶变换源代码 (STFT SOURCE CODE)
- 2009-05-11 18:36:18下载
- 积分:1