matlab实现浮点数转换

收录时间:2022-05-10
资源分类:Matlab 工具:MATLAB 7 (R14)

matlab实现浮点数转换

Floating Point Number Conversion

This package is designed to convert floating point point numbers from their decimal to their binary formats, according to the IEEE 754 standard. This is useful when calculations at the limits of MATLAB precision are performed or when the binary strings are of interest, such as in genetic algorithms. The package consists of the following four scripts.

 

float2bin: converts decimal floating point numbers to IEEE 754 binary string

 

bin2float: converts binary string to floating point number

 

bitstr2vec: converts binary string to binary vector of 0s and 1s

 

bitvec2str: converts binary vector to binary string

 

The floating point format that Matlab utilizes and some functions relating to floating point precision and limits are described in this post:

 

http://matlabgeeks.com/tips-tutorials/floating-point-numbers-in-matlab-2/

 

The float2bin function included in this package is described in this post:

 

http://matlabgeeks.com/tips-tutorials/conversion-of-floating-point-numbers-in-matlab/

文件下载列表
float2bin.zip (3.83KB)  
附件内容(只显示7中的6个)
bin2float.m  bitstr2vec.m  bitvec2str.m  float2bin.m  ._bitstr2vec.m  ._bitvec2str.m  
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备18060134号-3