Study notes-Matlab algorithm articles-difference equation modeling

Difference equation modeling

01 Differential equation modeling

02 Cobweb Model

The question is raised: In a society of free competition, there will be cyclical fluctuations in many fields. In the economic field, the following phenomenon can be seen from the price change of a certain commodity on the free market: in a certain period, the quantity of the commodity on the market exceeds the demand, causing the price to fall, and the producer feels that the commodity is unprofitable and turns Dealing with other commodities; after a period of time, as the output declines, the shortage will lead to price increases, and many manufacturers will produce the commodities; then, there will be a surplus of commodities and prices will fall. In the absence of external interference, this phenomenon will occur repeatedly. How to describe the above phenomenon from a mathematical perspective?

03 genetic model

With the evolution of human beings, in order to reveal the mystery of life, people pay more and more attention to the research of genetics, especially the transmission of genetic characteristics from generation to generation, which has attracted more attention. Both humans, animals and plants will inherit their own characteristics to the next generation. This is mainly because the offspring inherit the genes of both parents and form their own gene pairs. The gene pairs will determine the characteristics of the offspring. Next, we will study the way in which autosomal inheritance is inherited from parental genes to offspring, and establish models. Using these models, we can study the distribution of an overall genotype from generation to generation. In autosomal inheritance, offspring inherit one gene from each parent's gene pair to form their own gene pair, which is also called genotype.

Example (e02) : The genotypes of a certain plant in the farm’s botanical garden are Aa AA , and aa . The farm plans to use a combination of AA type plants and plants of each genotype to breed plant offspring. After several years, what is the distribution of the three genotypes in any generation of this plant?

%% 遗传模型

syms n a0 b0 c0
M=sym([1,1/2,0;0,1/2,1;0,0,0]);
[p,lamda]=eig(M);
x=p*lamda.^n*p^(-1)*[a0;b0;c0];
x=simplify(x)  

result:

>> e01
 
x =
 
 a0 + b0*(2*0^n - (1/2)^n + 1) + c0*(5*0^n - 2*(1/2)^n + 1)
   - b0*(3*0^n - (1/2)^n) - c0*(6*0^n - 2*(1/2)^n) - 0^n*a0
                                     0^n*(a0 + 2*b0 + 4*c0)

 

 

 

Guess you like

Origin blog.csdn.net/seek97/article/details/108346021