Lkelly9 Week 7: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
(→‎Workflow/Methods: added image of updated equations)
(→‎References: referenced assignment page)
Line 38: Line 38:
==Acknowledgements==
==Acknowledgements==
==References==
==References==
Dahlquist, Kam D. (2017) BIOL398-05/S17:Week 7. Retrieved from http://www.openwetware.org/wiki/BIOL398-05/S17:Week_7 on 26 February 2017.

Revision as of 16:44, 26 February 2017

Navigation Links

Purpose

Workflow/Methods

  • Created an updated version of my differential equations and attempted to run them in MATLAB

  • Used the script below. Will make changes to the plot labels to better reflect my model
global q u1 u2 y K1 K2 V R
q= 0;
u1= 20;
u2 = 30;
y = 4;
K1 = 3;
K2 = 7;
R = 0.76;
V= 56;
tt = 0:0.1:10;
x0 = [1;2];
[t,x] = ode45('week7projectfunction',tt,x0);
plot(t,x)
xlabel('time')
ylabel('abundance')
title('Population and food source over time')
legend('Population','Food')
  • Used the function below.
    • When I tried to run it, I kept getting an error that said "'week7projectfunction' requires more input arguments to run." It appears that there is a possible problem with the (t,x).
function dx = week7projectfunction(t,x)
global q u1 u2 y K1 K2 V R
dx = zeros(size(x));
dx(1) = (q*u1) - (q*x(1)) - x(3)*((x(1))/((x(1))+K1))*((x(2))/((x(2))+K2));
dx(2) = (q*u2) - (q*x(2)) - x(3)*((x(1))/((x(1))+K1))*((x(2))/((x(2))+K2));
dx(3) = (x(3))*R*((x(1))/((x(1))+K1))*((x(2))/((x(2))+K2))-(q*y);
dx(4) = V(1-(V/y))*V;
end

Results

Conclusion

Acknowledgements

References

Dahlquist, Kam D. (2017) BIOL398-05/S17:Week 7. Retrieved from http://www.openwetware.org/wiki/BIOL398-05/S17:Week_7 on 26 February 2017.