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

📄 bit2num.m

📁 一个启发式搜索算法  给初学者用的 随便参考着用  提供了多种策略
💻 M
字号:
function y=bit2num(th_bit,b,thetmin,thetmax)
% J. C. Spall, August 1999
% For the relevant element of theta (say, the jth), this function converts bit 
% representation to floating point no. with M(j) 
% decimal places of accuracy (the M vector used in GAbit_roulette).  
%           
y=0;
for i=1:b
   y=y+th_bit(b+1-i)*2^(i-1);
end
y=thetmin+(thetmax-thetmin)*y/(2^b-1);

⌨️ 快捷键说明

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