i have a 1×10 column vector consisting of random numbers.
and i want to apply the following if statement to each number in the column vector.
if R < 0.5; step = -1; elseif R > 0.5; step = 1; end
where R is the column vector, and so the solution would be a 1×10 column vector consisting of either +1 or -1
any help is appreciatied, thanks.
Best Answer