"Frank " <allinone_2003@yahoo.com.hk> wrote in message <jpkseo$afl$1@newscl01ah.mathworks.com>... > Thanks for your reply. > > However, we want x = [x_1, x_2, ... x_M]^T with |x_1|=|x_2| = ...=|x_M| = 1.
x= 2*(dec2bin(0:2^M-1)-'0')-1 x = x(find(ismember(x*A',b','rows')),:)'