Write a matlab code that plots the phase portrait of system

Assignment Help MATLAB Programming
Reference no: EM131431125

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

Reference no: EM131431125

Questions Cloud

Cerevisiae resistant to antibiotics : Why is s. cerevisiae resistant to antibiotics including, penicillin, kanamycin, gentamicin, ampicillin, tetracycline, neomycin, streptomycin and chloramphenicol.
Perspective on balancing economic growth-environmental issue : What are some of the similarities and differences between U.S. treatment of Indians and Canada’s of Aboriginals? What accounts for the differences? what is your perspective on balancing economic growth and environmental issues? Discuss.
Will your choice affect your fixed and variable costs : As a movie exhibitor, you can choose between paying a flat fee of $5,000 to show a movie for a week or paying a fee of $2 per customer. Will your choice affect your fixed and variable costs? How?
What effect does it have on the social and the task process : Discuss in detail one aspect of group theory and use your group and group project as an example. Comment on the importance of this group topic to your group project. How would you enhance your group work and group project based on the material fro..
Write a matlab code that plots the phase portrait of system : 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 un..
Line of defense will mount an immune response : A person infected first infected by a pathogen will get sick, but their third line of defense will mount an immune response and they will fight off the pathogen. When they later encounter the same pathogen, the response is much stronger and much mo..
What is the marginal product of the 51st worker : What is the marginal cost to produce one more vest? (Hint: Think of the marginal cost as the additional worker's pay divided by the changes in output.)
Find confidence interval for the true proportion of people : A new prescription medication is designed to ease the pain of arthritis. - Find a 95% confidence interval for the true proportion of people who suffered a headache in each of the groups.
Service learning topic-tuskegee experiment report : For Academic Service Learning credit, you may submit a full three-page report on the Tuskegee Experiment. In your report, tell how this tragic incident relates to African American health services in that era. Please include a reference cited page

Reviews

len1431125

3/17/2017 6:14:24 AM

Please check the attached MATLAB assignment, and get back with a suitable reply, if you can get the work done perfectly. Hi I would like to make a request for Matlab coding. Please let me know if it’s possible. Remark The graph above shows only one of the possibilities, with some particular values of the parameters. 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.

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd