title: ode45 error, index out of bounds because numel(x)=1
body: <pre><code>    function xx = test(x, t)
  
  
     xx(1) = x(2);
     xx(2) = x(3) * cos(x(4) + x(1));
     xx(3) = 0;
     xx(4) = 0;
  
  end
  </code></pre>
  
  <p>That is my script, confused as to why I am getting this error. </p>