is there a built in function to get minimum nr of bits for an integer ?
1 次查看(过去 30 天)
显示 更早的评论
I have found the formula for minimum nr of bits for a integer
bspec = floor(log2(16)) + 1
Is there a built in function for this in MATLAB ?
1 个评论
dpb
2016-10-2
When you write one, there will be... :)
But, what do you need a function for a constant; unless you intended the argument '16' to be a variable based on the length of a word???
If the object is to find out the size of an integer, see
doc class
doc isa
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!