title: How to display (print) vector in Matlab?
body: <p>I have a vector <code>x = (1, 2, 3)</code> and I want to display (print) it as <code>Answer: (1, 2, 3)</code>.</p>
  
  <p>I have tried many approaches, including:</p>
  
  <pre><code>disp('Answer: ')
  strtrim(sprintf('%f ', x))
  </code></pre>
  
  <p>But I still can't get it to print in format which I need.</p>
  
  <p>Could someone point me to the solution, please?</p>
  
  <p><strong>EDIT:</strong>
  Both the values and (length of) <code>x</code> are not known in advance.</p>