dimanche 26 mai 2019

c# How do you choose a number and its neighbours that form a 2x2 matrix , from a 4x4 matrix?

I have a 4x4 matrix , filled with double numbers (its a homogenic matrix), and i have to choose a number randomly , and 3 of its neighbours (so they form a 2x2 matrix).

The point is to keep the matrix stochastic after substracting a random number out 2 numbers , and adding the same random number to the other two numbers (1000 cycles)




Aucun commentaire:

Enregistrer un commentaire