Binary-Float convertor
版本 1.0.0.0 (862 字节) 作者:
Dogac Basaran
There are two functions to convert floats and binary streams to each other
Matlab builtin functions bin2dec and dec2bin are not sufficient for float to binary and binary to float conversions. float2bin(in) function takes a floating point number as an input and returns a binary representation. bin2float(bin) function takes a binary representation as an input and returns a floating point number.
Example usage:
>> out = float2bin(6.875)
out =
110.111
>> out = bin2float('110.111')
out =
6.8750
引用格式
Dogac Basaran (2024). Binary-Float convertor (https://www.mathworks.com/matlabcentral/fileexchange/56893-binary-float-convertor), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2016a
兼容任何版本
平台兼容性
Windows macOS Linux类别
在 Help Center 和 MATLAB Answers 中查找有关 Data Type Conversion 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 |