File:Lotka Volterra Phase plane 100.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 512 × 384 pixels, file size: 526 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: This figure shows the Prey-Predator dynamics

as described by the level curves of the conserved quantity H, α *x + y − log(x^α*y) = H α is a constant x represents the quantity of preys y represents the quantity of predator

For more details, the reader can refer to Mathematical Biology: I. An Introduction,

J.D. Murray
Date
Source Own work
Author Guillaume Jacquenot
SVG development
InfoField
 
The SVG code is valid.
 
This diagram was created with MATLAB.
Source code
InfoField

MATLAB code

function Lotka_Volterra_Phase_plane(alpha)
% This function shows the Prey-Predator dynamics
% as described by the level curves of the conserved quantity H, 
% α *x + y − log(x^α*y) = H
% α is a constant
% x represents the quantity of preys
% y represents the quantity of predator
%
%
% For more details, the reader can refer to 
% Mathematical Biology: I. An Introduction,
% J.D. Murray
%

if nargin == 0
    alpha = 1;
end

%% Define step size and axis range
stepsize_c = 0.01;
stepsize_q = 0.5;
max_u_size = 8;
max_v_size = 8;

%% Generate the grid points and compute the Lotka Volterra function
[Xc,Yc]=meshgrid(0:stepsize_c:max_u_size,0:stepsize_c:max_v_size);
Zc = log(alpha*Xc+Yc-log(Xc.^alpha.*Yc));

%% Create graphic
figure;
box on
hold on
grid on
axis equal
axis([0 max_u_size 0 max_v_size]);
contour(Xc,Yc,Zc,0.5:0.1:4);

% [C,Hc] = contour(Xc,Yc,Zc,0.5:0.1:4);
% RR = get(Hc,'Children');
% for i=1:numel(RR)
%     XD = get(RR(i),'XData');
%     YD = get(RR(i),'YData');
%     [XD,YD]
% end

% [PXc,PYc] = gradient(Zc,stepsize_c,stepsize_c);
%
% selectX = ismember(0:stepsize_c:max_u_size,...
%                    stepsize_q:stepsize_q:max_u_size-stepsize_q);
% selectY = ismember(0:stepsize_c:max_v_size,...
%                    stepsize_q:stepsize_q:max_v_size-stepsize_q);
% [Xq,Yq]=meshgrid(stepsize_q:stepsize_q:max_u_size-stepsize_q,...
%                  stepsize_q:stepsize_q:max_v_size-stepsize_q);
% quiver(Xq,Yq,PXc(selectX,selectY),PYc(selectX,selectY));

%% Create label and title
xlabel('x')
ylabel('y    ','Rotation',0);
title(['\alpha = ' num2str(alpha)],'Interpreter','Tex');
filename = [mfilename '_' sprintf('%03d',floor(100*alpha))];
saveas(gcf,filename,'png');
plot2svg([filename '.svg']);

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current21:23, 1 November 2010Thumbnail for version as of 21:23, 1 November 2010512 × 384 (526 KB)Gjacquenot (talk | contribs){{Information |Description={{en|1=This figure shows the Prey-Predator dynamics as described by the level curves of the conserved quantity H, α *x + y − log(x^α*y) = H α is a constant x represents the quantity of preys y represents the quantity of pr

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata