# Math Help - need a matlab function

1. ## need a matlab function

How would I choose whether a constant is + or - with equal probability in matlab?

2. Originally Posted by FGT12
How would I choose whether a constant is + or - with equal probability in matlab?
x=abs(x)*( 1-2*(rand(1,1)<0.5) )