title: Creating vectors from integer inputs and then duplicating the elements in matlab
body: <p>you're going to hate me for asking such a simple question but I don't understand why this code won't work!</p>
  
  <pre><code>test = input('Please enter an integer:')
  vec = []'
  B = int2str(test)
  for i = 1:length(test)
     vec = [vec;B(i)]
     end
  C = kron(vec,ones(100,1))
  </code></pre>
  
  <p>So basically what it's supposed to do is take in an integer from a user such as 101 then convert it into a column vector [1,0,1]' and then duplicate each element by 3 times so you get [1,1,1,0,0,0,1,1,1]' but instead I am getting [49,49,49,48,48,48,47,47,47]' which I understand are the ascii values but I don't get why it's doing this to me. I had to convert the user input into a string otherwise it woundn't convert it into a column vector at all but by doing so it messes with the rest of the code...any help will be appreciated - thank you!.</p>