title: How to store outputs in a vector?
body: <p>I need to put the outputs of my function into a vector.</p>
  
  <p>In fact my results seems like this:</p>
  
  <pre><code>ans= 
  
  result 1
  
  ans=
  
  result2 
  
  ans=
  
  result3
  
  ......
  </code></pre>
  
  <p>I need that my result look  like this:</p>
  
  <pre><code>Vector= (result1
           result2
           result3
           ....)
  </code></pre>
  
  <p>The head of my function is like this:</p>
  
  <pre><code>function[keys]=generate()
  
      for k=1:257
        x= round(rand*9);
        vet = x*ones(1,16);
        i= round(rand*length(vet));
        i(i==0)=1;
        val= round(rand*257);
        vet(i)=val;
        keys=dec2hex (vet)
      endfor 
  
  endfunction
  </code></pre>
  
  <p>I would be very grateful if you could help me.</p>