Faster alternative to builtin str2double

str2doubles converts character string to double number faster than the builtin str2double.
374.0 次下载
更新时间 2017/2/20

查看许可证

This is a patched version of @Quant Guy's str2doubleq.cpp (submission #28893, last time updated five years ago). It includes a fix for memory leak indicated by @Jonathan and @Matthew Gunn in the comments. It also offers str2doubles.m, an interpreted language alternative to the mex (no compilation necessary) as given by @Jan Simon. Both .cpp and .m are slightly improved to deal with missing data. (Notice the mex version always returns complex-valued output, which doubles the storage; use wrapper str2doubleq2.m to discard all-zero imaginary component.)

引用格式

Felipe G. Nievinski (2024). Faster alternative to builtin str2double (https://www.mathworks.com/matlabcentral/fileexchange/61652-faster-alternative-to-builtin-str2double), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 String Parsing 的更多信息
致谢

参考作品: Fast String to Double Conversion

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

- added support for multidimensional cell arrays in str2doubles.
- offered new wrapper for str2doubleq for non-complex data.