%Let b(i) denote the binary string with index i. %If x=(i1,i2,...,ik), executing print_bitstrings(x) %yields a display of the strings b(i1), b(i2), ..., b(ik) %on the screen. % Usage: % print_bitstrings([1 2 3 4 5]) % gives % 0 % 1 % 00 % 01 % 10 % See also INDEX_TO_BITSTRING, BITSTRING_TO_INDEX. % by John C. Kieffer % http://www.ee.umn.edu/users/kieffer/programs.html % documented in % ftp://oz.ee.umn.edu/users/kieffer/seminar/notes1.ps % more documentation by David Cary 1999-05-06 function y=print_bitstrings(x) N=length(x); for i=1:N; z=index_to_bitstring(x(i)); print_without_spaces(z) fprintf(1,'\n') end