mashar786
08-17-2009, 08:22 AM
Hi
I want to create a random matrix say of size 3x3. By the help of ran
command i am getting a matrix like
A=[ 1.xxxx 2.xxxx 3.xxxx ; 4.xxxx 5.xxxx and so on]
But the thing i required is the matrix of size 3x3 randomly created suc
that it should have all the elements from 1 to 9.
I tried round(rand(rows,columns)), but here problem i am getting is tha
some numbers are repeated also eg 3.2323 and 3.9494 both are rounded to 4
which i dont require. My requirement is to recieve unique whole numbe
matrix consisting of elements 1 to m*n.
I want to create a random matrix say of size 3x3. By the help of ran
command i am getting a matrix like
A=[ 1.xxxx 2.xxxx 3.xxxx ; 4.xxxx 5.xxxx and so on]
But the thing i required is the matrix of size 3x3 randomly created suc
that it should have all the elements from 1 to 9.
I tried round(rand(rows,columns)), but here problem i am getting is tha
some numbers are repeated also eg 3.2323 and 3.9494 both are rounded to 4
which i dont require. My requirement is to recieve unique whole numbe
matrix consisting of elements 1 to m*n.