function mutatedInds = mutation(recombinatedInds,N) mutatedInds=recombinatedInds; mutationMatrix=rand(N,8)>0.95; [p q]=find(mutationMatrix); pq=[p q]; for i=1:numel(p) u=pq(i,1); v=pq(i,2); temp1=mutatedInds(u,:); temp2=uint8(temp1); temp2(v)=97-temp2(v); mutatedInds(u,:)=char(temp2); end end