title: Error : 'x' undefined
body: <p>I got a problem with running Octave function (ODE), I've tried already present solutions for this problem but nothing is working. I've also tried by saving my filename as <code>egzamin.m</code> but it too not worked. </p>
  
  <p><strong>Code from octave :</strong> </p>
  
  <pre><code>function dx=egzamin(x,t)
  dx=zeros(4,1);
  b=0;
  g=9.81;
  x1=x(1);
  y1=x(2);
  Vx=x(3);
  Vy=x(4);
  dx(1)=Vx;
  dx(2)=Vy;
  dx(3)=-b*Vx*sqrt(Vx.^2+Vy.^2);
  dx(4)=-b*Vy*sqrt(Vx.^2+Vy.^2)-g;
  endfunction
  N=mod(291813,100);
  x1=0;
  y1=0;
  Vx=20+N;
  Vy=20+N;
  
  t=0:0.01:500;
  sol=lsode("egzamin",[x1,y1,Vx,Vy],t);
  plot(sol(:,1),sol(:,2)) 
  </code></pre>
  
  <p>The error is : </p>
  
  <pre><code>error: 'x' undefined near line 5 column 4
  error: called from
      egzamin at line 5 column 3
  </code></pre>