-
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
-
在C程序中显示汉字
在许多C程序设计中,要用到汉字进行提示或人机交互,而现行的Turbo C集成开发环境不是汉化的,如何编制能显示汉字的C程序呢?本实例提供一种在非汉化环境下正常显示汉字的方法。(in many C program design, the use of Chinese characters for hints or human-computer interaction, and the existing Turbo C integrated development environment is not finished, will show how to prepare Chinese C procedures? The examples provide an environment in the effort to show Chinese characters under the normal method.)
- 2005-03-31 22:48:07下载
- 积分:1
-
select_best
antenna pic chengxu chuli
- 2011-09-21 17:02:04下载
- 积分:1
-
musicdeviationsnapshotvarying
Matlab工具仿真,经典MUSIC算法,一次性得到多个信号的DOA估计参数(using matlab tool and classical MUSIC mathod,to get doas for multiple signals. good.)
- 2014-09-27 21:58:29下载
- 积分:1
-
readbin
read a file and convert it to binary ,so u can modify it and see ones and zeros
- 2011-11-02 05:06:24下载
- 积分:1
-
hallen
说明: 利用matlab解海伦方程并画出电流分布图(solutions using Matlab and paint Helen equation current distribution plan)
- 2006-04-21 20:25:03下载
- 积分:1
-
gry_drift
陀螺漂移仿真,仿真陀螺漂移误差模型,对于研究惯导陀螺误差有一定帮助(Gyro drift simulation gyro drift error model for the study of inertial gyro error of some help)
- 2014-12-15 11:26:12下载
- 积分:1
-
fuzzy
模糊控制得matlab仿真程序,主要做模糊控制仿真学习使用简单易懂。(Fuzzy control with matlab simulation program, the main job of fuzzy control simulation study using simple to understand.)
- 2009-10-12 21:31:26下载
- 积分:1
-
matlab
MATLAB的详细介绍,基于MATLAB的线性预测,语音信号,多个不同谐振频率的合成等等(A detailed description of MATLAB, MATLAB-based Linear Prediction, voice signal, a number of different resonant frequency synthesis, etc.)
- 2009-06-29 19:41:16下载
- 积分:1
-
image-enhancement
this program showing us the process of image enhancement
- 2011-05-08 18:16:41下载
- 积分:1