Real value to binary
11 次查看(过去 30 天)
显示 更早的评论
How can i convert my real value to binary digits?
For example; i have values within [0,25] range and 15 binary digits to represent a variable.(4 variables totally)
How can i do that and also reverse of that?
3 个评论
Walter Roberson
2012-5-11
3 decimal places requires 10 bits to resolve (2^(-10) = 1/1024)
You get slightly better resolution if you use 2^10 than if you use 10^3. It depends though on whether resolution is your goal or if "3 decimal places" is your goal.
采纳的回答
更多回答(3 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!