Consider a m*n
zero matrix. I want to select some elements randomly in a specific range of rows and columns in a way that they somehow show some linear trend and put them equal to 1
. I created a pic to illustrate what I mean
Also, I need some of these randomly selected columns have more than one nonzero element. How can I generate these kind of matrices?
Aucun commentaire:
Enregistrer un commentaire