Faster dec2base Function

This is a fast replacement for dec2base. It has the same syntax as dec2base and does not require compiling.

您现在正在关注此提交

dec2base is a nice function but slow for large arrays and quite RAM hungry.
This version is a lot faster and minimizes RAM usage. It has the same input-output behavior as dec2base.

To make use of this improvement, just replace all your dec2base calls with ndec2base.

Included are two files: ndec2base.m and fdec2base.m

ndec2base has the same error checks as dec2base
fdec2base skips error checks to be a little faster, is only faster on small arrays

Function is fastest for bases 10 and lower.

For best results call the function on a whole array instead of calling it on each element.

引用格式

Friedrich (2026). Faster dec2base Function (https://ww2.mathworks.cn/matlabcentral/fileexchange/68581-faster-dec2base-function), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: Faster base2dec Function

启发作品: Faster base2dec Function

类别

Help CenterMATLAB Answers 中查找有关 Loops and Conditional Statements 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0