title: How to concatenate strings in a loop?
body: <p>I'd like to create an inputdlg with various lines with similar names like Test 1, Test 2, Test 3 and so. So I'm looking for some way to concatenate strings in a <code>for</code> loop. I tried something like:</p>
  
  <pre><code> formatSpec = '''Test %d'',';
      a = sprintf(formatSpec,1);
      for i = 2:numtest
          a = strcat(a,sprintf(formatSpec,i));
      end
  </code></pre>
  
  <p>but it's not working for inputdlg. How do I do this?</p>