Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.34 KB | None | 0 0
  1. function Nt=function_algae_bloom(t,N)
  2.  
  3.  
  4. global mu r K
  5.  
  6. global z0 zL n D1
  7.  
  8.  
  9.  
  10. %Boundary conditions
  11. N(1)=0;
  12.  
  13. N(n)=0;
  14.  
  15.  
  16.  
  17. %Derivative matrix
  18. Nz=D1*N;
  19.  
  20. %second derivative matrix
  21. Nzz=D1*Nz;
  22.  
  23.  
  24.  
  25. Nt=mu*Nzz+r.*N*(1-N/K);
  26.  
  27.  
  28. %Boundary conditions are maintained in the derivative in respect to time
  29. Nt(1)=0;
  30. Nt(n)=0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement