Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function y=mutacja(populacja, prawdopodobienstwo)
- [m,n]=size(populacja);
- y=ones(m,n);
- for i=1:m
- for j=1:n
- if rand<prawdopodobienstwo
- y(i,j)=~populacja(i,j);
- else
- y(i,j)=populacja(i,j);
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement