title: Using scilab to solve and plot differential equations
body: <p>How can I solve the second order differential equation using scilab ode() function.
  (For example: y'' + 3y' +2y = f(x), y(0)=0, y'(0)=0)
  And then plot the result of function y(x).</p>
  
  <p>I want to use this to model the RLC-circuit signal with step-function input</p>
  
  <p>Here is the code I tried</p>
  
  <pre><code>function y=u(t)
      y=(sign(t)+1)/2
  endfunction
  
  L=0.001
  R=10
  C=0.000001
  
  function zdot=f(t,y)
      zdot(1)= y(2);
      zdot(2)=(u(t)-y(1)-L*y(2)/R)/(L*C);
  endfunction
  
  y0=[0,0];
  t0=0;
  t=0:0.00001:0.001;
  out=ode(y0,t0,t,f);
  clf();
  plot(out);
  </code></pre>
  
  <p>Thank you a lot</p>