-
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
-
matlab
用MATLAB设计界面,进行信号采集,并显示出来(Design using MATLAB interface for signal acquisition and display)
- 2011-08-24 17:28:15下载
- 积分:1
-
matlab 实现红绿黄交通信号灯的识别检测
matlab 实现红绿黄交通信号灯的识别检测,很容易理解,很适合新手学习(Recognition and detection of Matlab implementation of green and yellow traffic signal light, easy to understand, very suitable for beginners to learn)
- 2020-12-01 13:19:26下载
- 积分:1
-
bayes_classifier
贝叶斯分类器 模式识别(电子工业出版社)源代码(Bayesian classifier ..........)
- 2013-12-29 10:37:43下载
- 积分:1
-
linux
设计一程序,要求用带缓存的流文件I/O操作,在“./tmp”目录下,打开名称为“tmpfile”的文件。如果该文件不存在,则创建此文件;如果存在,将文件清空后关闭。W或w+(design a program, it need to use the cache files to operate the in/out directory)
- 2015-10-05 20:17:38下载
- 积分:1
-
frequency-dispersion-group-velocity
频散方程的相速度和群速度曲线分析和绘制,带备注。(frequency dispersion)
- 2016-04-21 23:47:07下载
- 积分:1
-
yingsui_v86
分析了该信号的时域、频域、倒谱,循环谱等,结合PCA的尺度不变特征变换(SIFT)算法,DC-DC部分采用定功率单环控制。( Analysis of the signal time domain, frequency domain, cepstrum, cyclic spectrum, etc. Combined with PCA scale invariant feature transform (SIFT) algorithm, DC-DC power single-part set-loop control.)
- 2016-09-21 15:33:48下载
- 积分:1
-
123
用C或者matlab编写基2 FFT快速算法,输入点数是2的幂次方,序列视作既包含实部也包含虚部。要求一个函数计可以做正变换,也可以做反变换。编写输入序列,先进行正反向变换,得到离散频谱,再将离散频谱加载到输入端进行验证,从输出端获取序列,和原来的序列进行比较,看看是否相等。序列可随意设为2的幂次项!(Written by C or matlab base 2 FFT fast algorithm, the input power of 2 points is the sequence includes both the real part as the imaginary part is also included. Require a meter to do is change the function, you can also do the inverse transform. The preparation of the input sequence, first the forward and reverse transformation, discrete spectrum, discrete spectrum and then loaded into the input validation, access to sequence from the output side, and the original sequences were compared to see if equal. Sequence can be arbitrarily set to a power of 2 items!)
- 2011-01-06 21:52:49下载
- 积分:1
-
WENO_1D_scheme
一维标准的WENO程序,使用了matlab编程环境。(standard one dimensional code of weno scheme using matlab.)
- 2015-09-21 02:41:54下载
- 积分:1
-
systemtestask
matlab数字滤波器,cic,hb,fir 滤波器
欢迎参考(Matlab digital filters, cic, hb, welcomed the reference filter fir)
- 2007-07-10 23:17:37下载
- 积分:1