Description Usage Arguments Value Examples
generates a matrix of 0 and 1
1 | generate_board_mat(n = 5, p = 0.25)
|
n |
integer, the dimension of the square matrix |
p |
a number between 0, 1, it's the probability to have 0's |
board with n rows and n columns and floor(p*n^2) 0's, the rest are 1's
1 | generate_board_mat(n = 5, p = 0.25)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.