title: non-numeric argument error using ode23s in R
body: <p>To understand and learn how ode23s method work in R, I used a simple system from a numerical analysis book and implemented. I encountered an error </p>
  
  <p><strong>Error in t + y[1]^2 : non-numeric argument to binary operator</strong></p>
  
  <p>Here is my code </p>
  
  <pre><code>#x'=t+x^2-y
  #y'=t^2-x+y^2
  #x(0)=3, y(0)=2
  
  model  &lt;- function(t,y) as.matrix(c(t+y[1]^2-y[2], t^2-y[1]+y[2]^2))
  sol &lt;- ode23s(model, 0, 20, c(3,2), jac = NULL, hmax = 0)
  </code></pre>
  
  <p>It looks to me that t is not numeric and I also used as.numeric(t) but did not work either. Could you please explain, how to fix this error?</p>