Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function matrixRandon = booleanMatrixRandom()
- booleanMatrix=zeros(10,10);
- auxF=0;
- auxC=0;
- i=0;
- while(i<15)
- auxF=randi([1,10]);
- auxC=randi([1,10]);
- if(booleanMatrix(auxF,auxC)~=1)
- booleanMatrix(auxF,auxC)=1;
- i=i+1;
- end
- end
- matrixRandon=booleanMatrix;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement