title: How to include double quote in Matlab's system() command
body: <p>I need to pass filename as input to a powershell command which includes spaces. Hence I am hoping to include double quotes.</p>
  <p>However, Matlab &quot;eats&quot; all double quotes in the input of <code>system()</code> when passing arguments to powershell.</p>
  <p>For example, note how the examples below all the the same output.</p>
  <pre class="lang-matlab prettyprint-override"><code>&gt;&gt; system('powershell.exe echo a c','-echo')
  a 
  c 
  ans =
       0
  &gt;&gt; system('powershell.exe echo &quot;a c&quot;','-echo')
  a 
  c 
  ans =
       0
  &gt;&gt; system('powershell.exe echo &quot;&quot;a c&quot;&quot;','-echo')
  a 
  c 
  ans =
       0
  &gt;&gt; system(['powershell.exe echo ',char(34),'a c',char(34)],'-echo')
  a 
  c 
  ans =
       0
  </code></pre>
  <p>The actual output for <code>echo &quot;a c&quot;</code> in powershell is <code>a c</code> in a single line. The change of line only occurs without double quotes.</p>
  <p>Just for experiment, I also tried <code>&quot;&quot;a c&quot;&quot;</code> and the expected input is the same as change line, a, change line, c. With the return, it seems that any and all double quotes are &quot;eaten&quot; alive by Matlab.</p>
  <p>How do I bring the double quotes back when using <code>system()</code>?</p>