Advertisement
Guest User

Untitled

a guest
Mar 1st, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.41 KB | None | 0 0
  1. //Model Lotki-Volterry
  2. function Ndot = LV(t,y)
  3.     Ndot = [b*y(1)-p1*y(1)*y(2);
  4.             -d*y(2)+p2*y(1)*y(2)];
  5. endfunction
  6. b = 1; //Dzietność
  7. d = 3; //Umieralność
  8. p1 = 0.8;
  9. p2 = 0.5;
  10. t = 0:0.1:20; //Oś czasu
  11. y0 = [100;200];
  12.  
  13. k = 0.1; //Wsp. konkurencji
  14.  
  15. y = ode(y0,t(1),t,LV);
  16. plot(t,y(1,:),'blue',t,y(2,:),'red');
  17.  
  18. xtitle('Model Lotki-Volterry','Czas [min]','Liczebność');
  19.  
  20. //Model Verhulsta
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement