Faster dec2base Function

Version 1.0.0 (3,18 KB) von Friedrich
This is a fast replacement for dec2base. It has the same syntax as dec2base and does not require compiling.
27 Downloads
Aktualisiert 20. Aug 2018

Lizenz anzeigen

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.

Zitieren als

Friedrich (2024). Faster dec2base Function (https://www.mathworks.com/matlabcentral/fileexchange/68581-faster-dec2base-function), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2015b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert von: Faster base2dec Function

Inspiriert: Faster base2dec Function

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0