gusucode.com > 十大算法matlab程序说明 > 十大算法matlab程序说明/模拟退火,禁忌搜索,遗传算法,神经网络-MATLAB程序合集/简单函数优化的遗传算法程序/pro.m
function pcc=pro(pc); test(1:100)=0; l=round(100*pc); test(1:l)=1; n=round(rand*99)+1; pcc=test(n);