Transitionmatrix needs to be converted from day to one tenth of a day.
Show older comments
Hello,
i have a transitionmatrix that describes a population from one day to the other. I need to convert the transitionsmatrix so that one multiplication of my population with the matrix equals one tenth of a day instead of a full day. I already got a suggestion to use the squareroot, that only works with a single number but not within a transitionmatrix (atleast it did not work for me).
The folowing code is used to calculate:
%development rates of each stage
dpreg = 0.172;
dprL1 = 0.217;
dprL2 = 0.313;
dprL3 = 0.222;
dprL4 = 0.135;
dprPu = 0.099;
%relative mortality rates of each stage
rmreg = 0.017;
rmrL1 = 0.060;
rmrL2 = 0.032;
rmrL3 = 0.022;
rmrL4 = 0.020;
rmrPu = 0.020;
rmrAd = 0.027;
B1 = [1-(dpreg+rmreg),0,0,0,0,0,0;
dpreg,1-(dprL1+rmrL1),0,0,0,0,0;
0,dprL1,1-(dprL2+rmrL2),0,0,0,0;
0,0,dprL2,1-(dprL3+rmrL3),0,0,0;
0,0,0,dprL3,1-(dprL4+rmrL4),0,0;
0,0,0,0,dprL4,1-(dprPu+rmrPu),0;
0,0,0,0,0,dprPu,1-rmrAd];
A = [10;10;10;10;10;10;10];
%%this loop can be used to calculate the result for 10 days to check whether it is the same %result, to do so change the 1:1 to 1:10
for i = 1:1
C = B1*A;
A=C;
end
Thanks a lot
Best regards Dominik
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!