I would like to create a random real symmetric square matrix with elements evenly distributed between 0 and 1. My attempt: a = rand(5); b = a + a.'
a = rand(5); b = a + a.'
My concern is that although matrix a is evenly distributed according to the documentation http://www.mathworks.com.au/help/techdoc/ref/rand.html , matrix b may not be, since the average of the two random numbers may not be the same as the original number.
I tried using hist(a); hist(b)
hist(a); hist(b)
but not sure how to interpret the resulting graph. EDIT: According to the Oli matrix, b is no longer evenly distributed, is there a way to do it this way?
source share