title: Matlab: How to plot this fourier series, where each index is odd
body: <p><a href="https://i.stack.imgur.com/sTdfK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sTdfK.png" alt="enter image description here"></a></p>
  
  <p>How do I enter the formula shown above? I can't seem to get n = 1, 3, 5, ...
  I tried different code along the line of this: </p>
  
  <pre><code>syms k x
  x = 1/2 + symsum(k^2, k, [1:2:15])
  </code></pre>
  
  <p>But there is an error message.</p>
  
  <p>Also, on a side note, what's the purpose of syms and the "x" variable shown in the matlab documentation example where I got this code?</p>