Question: Random out only two values 1 or -1

Hello,

I want numerical randoms whose out are 1 or -1 only, how do i it?

I tried this:

with(Statistics):

RM := LinearAlgebra:-RandomMatrix(10, generator = -1 .. 1)

But this is not work as well.

Regards.

Please Wait...