-
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
-
daizu50
使用matlab实现FIR滤波器的50Hz陷波器设计,简单实用(Use matlab 50Hz notch FIR filter design, simple and practical)
- 2012-05-23 22:27:33下载
- 积分:1
-
case30_Serhat
THIS IS IEEE TEST BUS SYSTEM
- 2015-01-01 21:21:05下载
- 积分:1
-
faceIcarecog
source code for face recognition using ica (independent component analysis)
- 2010-08-08 20:10:09下载
- 积分:1
-
LP
说明: 基于径向基神经网络的算法逼近低通滤波器,用Matlab编程实现(Based on RBF Neural Network Approximation algorithm low-pass filter, using Matlab programming)
- 2009-10-12 20:02:20下载
- 积分:1
-
cordic--matlab
用matlab写的cordic算法,仿真通过(it is about cordic)
- 2011-04-28 10:02:47下载
- 积分:1
-
MATLAB_examples
MATLAB从入门到精通_配套光盘.rarMATLAB从入门到精通_配套光盘.rarMATLAB从入门到精通_配套光盘.rarMATLAB从入门到精通_配套光盘.rar(matlab matlab)
- 2012-04-10 19:46:39下载
- 积分:1
-
data-acq-through-mic
this program used to acquire data through pc mic with 8khz sampling frequency.
it collects data upto 2sec s duration, (can be varied)
and reprodued
- 2011-05-31 12:38:29下载
- 积分:1
-
A1_2
mathews数值分析书的例题程序,用matlab编写,可以对照课本学习。(mathews numerical analysis book example program using matlab, you can control textbook learning.)
- 2011-10-20 10:15:01下载
- 积分:1
-
3
说明: 波束调向直线阵 边射阵和端射阵是一般调向直线阵的特例(Beam transfer line array broadside to the array and end-fire array is generally transferred to the special case of linear array)
- 2010-10-26 14:57:59下载
- 积分:1