clear; x=0:255; y=sin((pi*x)/256); plot(x,y,'LineWidth',2.5) axis([0 260 0 1.05]) grid on a=randperm(255); rnd_numbers=a(1:8); fitnes=zeros(1,8); y=inline('sin((pi*x)/256)'); fitnes=y(rnd_numbers); sum_fitnes=sum(fitnes); norm_fitnes=fitnes/sum_fitnes; q=sum(norm_fitnes); rnd_numbers, norm_fitnes selection=[]; for i=1:8 select_rnd=rand; if select_rnd