fork download
  1. function f=vdpWJacobian(mu, A, w, t, X)
  2.  
  3. %Rearrange input data
  4. x=X(1); y=X(2);
  5. Q=[X(3), X(5);
  6. X(4), X(6)];
  7.  
  8. f=zeros(6,1);
  9. %Duffing's Van Der Pol equation
  10. f(1)=y;
  11. f(2)=mu*(1-x^2)*y-x+A*cos(w*t);
  12.  
  13. %Linearized system (Jacobian)
  14. J = [ 0, 1;
  15. -2*mu*x*y-1, mu*(1-x^2)];
  16.  
  17. %Variational equation
  18. f(3:6)=J*Q;
  19.  
Success #stdin #stdout #stderr 0.17s 65040KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
parse error:

  function body open at end of input