title: Right Pad String with spaces Matlab
body: <p>So the following code can left pad a string with spaces keeping a max length of max_len (spaces and string included).</p>
  
  <pre><code>max_len = 20; 
  
  spacing_arg = ['% ', max_len,'s'];
  
  padded_string = sprintf(spacing_arg, str);
  </code></pre>
  
  <p>Now how to do it efficiently with right padding?</p>