________________________________
 
 

Hello all


I have been trying to make a matrix that starts out with all zeros 

and then cycles threw all combinations of  a binay numbers for instance 



if I had a matrix 

[ 0 0 0 0]

then I would like it to cycle very fast to go threw all combinations 

like this 


[ 0 0 0 0 ]
[ 0 0 0 1 ]
[ 0 0 1 1 ]
[ 0 0 1 0 ]
[ 0 1 1 0 ]
[ 0 1 0 0 ]
[ 0 1 0 1 ]
[ 0 1 1 1 ]
[ 1 1 1 1 ]
[ 1 1 1 0 ]
[ 1 1 0 0 ]
[ 1 1 0 1 ]
[ 1 0 0 1 ]
[ 1 0 1 1 ]
[ 1 0 1 0 ]


I know I can do this 


$k = zeros(4); 
p $h->(3).=1;
p $h->(2).=1;
p $h->(3).=0;
p $h->(1).=1;
p $h->(2).=0;
p $h->(3).=1;
p $h->(2).=1;
p $h->(0).=1;
p $h->(3).=0;
p $h->(2).=0;
p $h->(3).=1;
p $h->(1).=0;
p $h->(2).=1;
p $h->(3).=0;

is there a faster way to do this that anyone might know of  ???

Thanks for your advice ..




-Mark R Baker 
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to