Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. function rown()
  2.  
  3. opcje=odeset('OutputFcn',@odephas2);
  4. [t,y]=ode23(@dp,[0 12],[2 4],opcje);
  5. hold on;
  6. [t,y]=ode23(@dp,[0 12],[-4 0],opcje);
  7. hold on;
  8. [t,y]=ode23(@dp,[0 12],[-1 -4],opcje);
  9. hold on;
  10. [t,y]=ode23(@dp,[0 12],[4 -1],opcje);
  11. set(gca,'XLim',[-5,5],'YLim',[-5,5],'XGrid','on','YGrid','on')
  12. hold on;
  13.  
  14. function dydt = dp(t,y)
  15. dydt = zeros(2,1);
  16. dydt(1) = [(-1.5*y(1))+y(2)];
  17. dydt(2) = [(0.25*y(1))-(1.5*y(2))];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement