Ask MATLAB Expert

Activity: the Lotka-Volterra model of an inter specific competition

Objective: Apply the MATLAB skilled we learned to a particular predator-prey model.

We are going to model the population of two species competing for the same limited resource. For example, you might think of wolves and foxes living in the same forest. We'll use a modification of the Lotka-Volterra model called "Competitive Lotka-Volterra equations":

dx/dt = r1x(1- (x+C12y)/K1), dy/dt = r2y(1-(y+C21x)/K2),

where x(t) and y(t) are the two populations. Further, we have the following positive constant coefficients: r1 and r2 are the natural growth rates of the respective species, K1 and K2 are the carrying capacities, C12 and C21 are the competition coefficients that show the negative impact that the first species has on the second one and, respectively, the negative impact that the second species has on the first one. For instance, if C12 is much bigger than C21, then we could think of a scenario when x is a small predator and y is a big predator and the big predator can always win a direct fight with the small one while the harm caused by the small predator is just that they eat the same food. In particular, if C12 = C21 = 0, then we would get two independent logistic equations.

K1 = 1600              K2 = 1600             

r1 = 0.11                r2 = 0.10

Your task:

Write a MATLAB code that plots the phase portrait of the system. The values of the parameters r1, r2, K1, K2 are fixed and to be extracted from your matriculation number and you'll need to write a report that describes the behaviour of the system under different values of the coefficients C12 and C21. Your are supposed to

1. Find equilibrium solutions analytically. You will notice there are three significantly different cases: 1 -C12 C21 > 0, 1 - C12 C21 = 0, and 1 - C12 C21 < 0.

2. Sketch possible phase portraits in each of the three cases described above. You will notice that there are two-subcases in each case, so you'll need to draw 6 diagrams overall. Please plot a fat dot that represents the nonzero equilibrium.

3. Write a conclusion: what are possible types of behaviour of this system depending on the values of C12 and C21? Under which values of the coefficients C12 and C21 do we observe one of the species dying out? Is it possible that both species die out? When do the both species survive? Are the populations going to approach a particular limit or we'll see cycles like in the classical predator-prey model? Is the limiting behaviour of the system affected by the initial conditions?

For instance, here is an example of a phase portrait that shows that the equilibrium solution is unstable and that depending on the initial conditions, one of the species will die out.

127_Figure.png

The initial conditions are shown by blue dots and the equilibrium (found analytically) is shown by the yellow dot.

Write a report, where you should include your name, your matric number, your values of the parameters r1, r2, K1, K2 and answers to all the questions above supported by calculations and diagrams prepared in MATLAB. Save your report as a PDF and submit it to your lab instructor.

Activity: model with a 2nd order differential equation

Objective: Apply the MATLAB skill we learned to find out some numerical info about the equation of a damped pendulum.

Recall that the equation d2x/dt2 + (g/L)sinx = 0 that we used in Activity describes the motion of an idealised pendulum, where the string weighs nothing and there is no friction and no energy loss. The motion is then periodic, where the period depends on the initial conditions (amplitude). Here, L is the length of the string.

Now we are going to introduce some reality by adding damping - an external force (say, due to friction) that causes the motion to stop eventually. The equation becomes

d2x/dt2 + C/M ⋅dx/dt + (g/L) sinx=0,

where C is the damping coefficient and M is the mass of the object on the string. You can simply Google "damped pendulum" to find out how this equation is derived.

C=0.16  M=1.6   L=11      

We are going to use the initial condition x(0) = 3π/4, (dx/dt)(0) = 0, which means that the initial angular displacement is 135 degrees and the initial speed is zero.

Your task:

Write a MATLAB code that plots the solution of the damped equation and the solution of the undamped equation together. Answer the following questions:

1. Obviously, damping makes the amplitude of oscillations decrease with time. Does damping affect the period of oscillations too? Does it become smaller or bigger because of damping? Does the length of one full oscillation remain constant, increase, or decrease?

2. How long does it take for the amplitude of oscillations to become smaller than 0.1?

Write a report, where you should include your name, your matric number, your values of the constants and answers to both questions above supported by a diagram prepared in MATLAB (Yes, this task is simpler than #10 - just one diagram and a few phrases will do). Save your report as a PDF and submit it to your lab instructor.

Please don't submit text files, word documents, photographed handwritten reports etc. Equations and diagrams should be very clear and readable. You can use MS Word, Open Office, Google Drive or LaTeX to prepare your report and save it as a PDF.

Of course, you can discuss your report with the instructor during the lab session to make sure that it includes everything and doesn't contain obvious errors.

Attachment:- MATLAB Assignment.rar

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M92239907

Have any Question?


Related Questions in MATLAB

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment details -need to write a code for connecting

Assignment Details - Need to write a code for connecting segments (Lines) a special case of TSP. The problem is to connect lines in 2d/ 3d space with path obstructions. Can you help me write the code for this? Hope you m ...

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As