Improved Base Expansion Algorithm

版本 1.1.0.0 (1.3 KB) 作者: Alexander Wallar
This is an improvement of my last base expansion algorithm
901.0 次下载
更新时间 2011/1/18

查看许可证

The difference between this algorithm and the other one that i posted is that it takes a vector as an input instead of a number. This is useful if the number you are trying to convert has digits bigger than 9.

Example:

>> baseVecExpand
n = [1 15 13 2]
starting base = 16
base of expanded number = 9

ans =

1 2 1 5 1

>>

My base expansion algorithms use input statements. All you need to do type in is baseVecExpand and the function will start running. you can also use it like a regular function

the regular funciton is baseVecExpand(number, base of number, base you want the number to be)

引用格式

Alexander Wallar (2024). Improved Base Expansion Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/30035-improved-base-expansion-algorithm), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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

improvements

1.0.0.0