title: Convert Decimal to Binary Vector
body: <p>I need to convert a Decimal Number to a Binary Vector</p>
  
  <p>For example, Something like this:</p>
  
  <pre><code>  length=de2bi(length_field,16);
  </code></pre>
  
  <p>Unfortunately, because of licensing, I cannot use this command. Is there any quick short technique for converting binary to a vector.</p>
  
  <p>Here is what I am looking for,</p>
  
  <pre><code>If 
  Data=12;
  Bin_Vec=Binary_To_Vector(Data,6) should return me
  Bin_Vec=[0 0 1 1 0 0]
  </code></pre>
  
  <p>Thanks</p>