Advertisement
Guest User

Untitled

a guest
May 26th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function y=mutacja(populacja, prawdopodobienstwo)
  2.  
  3. [m,n]=size(populacja);
  4. y=ones(m,n);
  5. for i=1:m
  6. for j=1:n
  7. if rand<prawdopodobienstwo
  8. y(i,j)=~populacja(i,j);
  9. else
  10. y(i,j)=populacja(i,j);
  11. end
  12. end
  13. end
  14.  
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement