⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bin2flt.m

📁 数值方法和MATLAB实现与应用.zip
💻 M
字号:
function f = bin2flt(c)
% bin2flt  Expand a binary representation of floating point mantissa
%
% Synopsis:  f = bin2flt(c)
%
% Input:     c = (string) bit sequence of the fractional part of a normalized
%                floating point number.
%
% Output     f = numerical equivalent of the bit pattern
%                      f = sum(k=1:n){ c(k)*2^(-k) }

f=0;
for k=1:length(c)
  f = f + str2num(c(k))*2^(-k);
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -