I am wondering whether there is an efficient way in MATLAB to generate all vectors of a fixed length with elements from a finite set.
For instance, how can I build all vectors of length 5 with only 0 or 1 as elements?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
not quite what you need, but permv generates vector permutations. If you do not find exact solution, you can adapt vector permutations.
permv