<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246367</link>
    <title>MATLAB Central Newsreader - Listing sequential binary numbers in vector form</title>
    <description>Feed for thread: Listing sequential binary numbers in vector form</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 11 Mar 2009 00:52:01 -0400</pubDate>
      <title>Listing sequential binary numbers in vector form</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246367#633919</link>
      <author>Camron Call</author>
      <description>I am trying to create a matrix listing all the binary numbers from 0 to 2^n-1 where n is an integer (no need for n&amp;gt;12).  I understand that if n = 3 then:&lt;br&gt;
&lt;br&gt;
dec2bin(0:2^n-1)&lt;br&gt;
&lt;br&gt;
will gives the following in a string format.&lt;br&gt;
&lt;br&gt;
000&lt;br&gt;
001&lt;br&gt;
010&lt;br&gt;
011&lt;br&gt;
100&lt;br&gt;
101&lt;br&gt;
110&lt;br&gt;
111&lt;br&gt;
&lt;br&gt;
I would like to figure out how to get the same thing in a matrix in number format such as:&lt;br&gt;
&lt;br&gt;
[0 0 0;&lt;br&gt;
0 0 1;&lt;br&gt;
0 1 0;&lt;br&gt;
...&lt;br&gt;
1 1 1]&lt;br&gt;
&lt;br&gt;
I don't need to use dec2bin if there is an easier way, but that's where I started.&lt;br&gt;
&lt;br&gt;
any ideas would be appreciated.</description>
    </item>
    <item>
      <pubDate>Wed, 11 Mar 2009 01:12:01 -0400</pubDate>
      <title>Re: Listing sequential binary numbers in vector form</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246367#633925</link>
      <author>Darren Rowland</author>
      <description>I think your question has been answered very recently in this thread&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/246265&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/246265&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Darren</description>
    </item>
    <item>
      <pubDate>Wed, 11 Mar 2009 20:05:19 -0400</pubDate>
      <title>Re: Listing sequential binary numbers in vector form</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/246367#634151</link>
      <author>Camron Call</author>
      <description>&quot;Darren Rowland&quot; &amp;lt;darrenjremovethisrowland@hotmail.com&amp;gt; wrote in message &amp;lt;gp7351$2pl$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I think your question has been answered very recently in this thread&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/246265&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/246265&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Darren&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Absolutely beautiful!!!  Thanks for your link.  Subtracting -'0' is a handy trick.</description>
    </item>
  </channel>
</rss>

