File Exchange

image thumbnail

FDATENUM_etc

version 1.0.0.0 (12.8 KB) by Zhigang Xu
A package offers much fast versions for datenum, datevec, and str2num.

0 Downloads

Updated 30 Sep 2003

View License

When the input strings to MATLAB functions of DATENUM, DATEVEC,and STR2NUM are very large, these functions are very intolerably slow (try for example the datenum with 100 yrs of hourly date string). FDATENUM, FDATEVEC, FSTR2NUM are fast counterparts of these MATLAB functions. The fastness owns a divide-and-conquer strategy, as comes as another function in this package, DIVCONQ. See FDATE_DEMO for a demonstration and the documents in the individual functions.

Cite As

Zhigang Xu (2020). FDATENUM_etc (https://www.mathworks.com/matlabcentral/fileexchange/4011-fdatenum_etc), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Eran

I tested fstr2num with a large string (>1,000,000) of numbers such as: 11 44 44 11 33 13 33 22 11 44. Separated by a single space. str2num takes 3-4 seconds to convert them to numeric. fstr2num took less than a second, but it produced many more numbers than actually are, probably breaking some of the numbers to single numbers (1 2 3 4).

In short, it doesn't work well. hope you can fix it because the world needs it!

Brent Haslem

Found fstr2num to be very fast compared to the original for the large cell arrays that I need to convert. I've been looking for a way to do something like this for awhile.

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux