SHARE
TWEET

Scilab, tp6 tracevdp function

SilLAwNeD Dec 3rd, 2018 131 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function tracevpd(a, t0, T, Neuler, Nptmil, Nrk4, Node)
  2.     // Approximation euler
  3.     u = euler(a, t0, T, Neuler, vdp);
  4.    
  5.     // Approximation point milieu
  6.     v = pointmilieu(a, t0, T, Nptmil, vdp);
  7.    
  8.     // Approximation runge kutta 4
  9.     w = rk4(a, t0, T, Nrk4, vdp);
  10.    
  11.     // Approximation ode
  12.     tode = linspace(t0, T, Node+1);
  13.     y = ode(a, t0, tode, vdp)
  14.    
  15.     // Euler
  16.     plot(u(1,:), u(2,:), '+');
  17.    
  18.     // Pt milieu
  19.     plot(v(1,:), v(2,:), 'yo');
  20.    
  21.     // RK4
  22.     plot(w(1,:), w(2,:), 'black.');
  23.    
  24.     // ODE
  25.     plot(y(1,:), y(2,:), 'rx');
  26.    
  27.     title('VDP');
  28. endfunction
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top