Ask your own question, for FREE!
Mathematics 18 Online
OpenStudy (usukidoll):

matlab - computing the eigenvalue, eigenvector, and the stability age structure.. Actually, I'm using matlab to compute the Leslie Matrices.

OpenStudy (usukidoll):

A=[0 1 5; .3 0 0 ; 0 .5 0] % Leslie matrix A = 0 1.0000 5.0000 0.3000 0 0 0 0.5000 0 % Calculate the eigenvalues and eigenvectors of A: [V,D]=eig(A) V = 0.9501 + 0.0000i 0.9270 + 0.0000i 0.9270 + 0.0000i 0.2800 + 0.0000i -0.1922 - 0.2609i -0.1922 + 0.2609i 0.1375 + 0.0000i -0.0559 + 0.1803i -0.0559 - 0.1803i D = 1.0182 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.5091 + 0.6910i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.5091 - 0.6910i StAgeStr = V(:,2)/(sum(V(:,2))) StAgeStr = 1.3465 + 0.1598i -0.2342 - 0.4121i -0.1124 + 0.2522i

OpenStudy (usukidoll):

B=[0 1 1; 2/3 0 0; 0 1/3 0] % Leslie Matrix B = 0 1.0000 1.0000 0.6667 0 0 0 0.3333 0 % Calculate the eigenvalues and eigenvectors of A: [V,D]=eig(B) V = -0.8021 + 0.0000i 0.5032 - 0.1002i 0.5032 + 0.1002i -0.5634 + 0.0000i -0.7069 + 0.0000i -0.7069 + 0.0000i -0.1979 + 0.0000i 0.4776 + 0.0951i 0.4776 - 0.0951i D = 0.9491 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.4746 + 0.0945i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.4746 - 0.0945i StAgeStr = V(:,2)/(sum(V(:,2))) StAgeStr = 1.8435 - 0.3317i -2.5802 - 0.0481i 1.7367 + 0.3797i

OpenStudy (usukidoll):

@dan815

OpenStudy (usukidoll):

StAgeStru is actually the Stable Age Structure..

OpenStudy (dan815):

what is a leslie matrix

OpenStudy (usukidoll):

I also saw in my example text file that I could use the following command: Note, for a complex eigenvalue lambda the command abs(lambda) gives its size. but I don't know how it works

OpenStudy (usukidoll):

In applied mathematics, the Leslie matrix is a discrete, age-structured model of population growth that is very popular in population ecology.

OpenStudy (usukidoll):

it's like a 3 x 3 matrix but solving for eigenvalues and eigenvectors remains the same.

OpenStudy (dan815):

your eigen values and eigen vectors are probably right

OpenStudy (usukidoll):

the questions I had were: % 3) For each of the following matrices, find the dominant eigenvalue % and the corresponding eigenvector, and the stable age structure % a) A=[0 1 5; .3 0 0 ; 0 .5 0] % Note, for a complex eigenvalue lambda the command abs(lambda) gives its size. % b) B=[0 1 1; 2/3 0 0; 0 1/3 0] so that's basically just inputing the matrices 1 by 1 Starting with % a) A=[0 1 5; .3 0 0 ; 0 .5 0] % Calculate the eigenvalues and eigenvectors of A: [V,D]=eig(A) and stability age structure StAgeStr = V(:,2)/(sum(V(:,2)))

OpenStudy (usukidoll):

and that's how I got all the stuff above *points up*

OpenStudy (dan815):

StAgeStr = V(:,2)/(sum(V(:,2))) why does this tell you stable age structture

OpenStudy (usukidoll):

ummmmm ._______.

OpenStudy (usukidoll):

% The "stable age structure" is the longterm fraction of the total % population represented by each stage: take the dominant eigenvector % and divide it by the sum of the entries in it

OpenStudy (dan815):

oh ok

OpenStudy (usukidoll):

wanna check another code? this one is for phase planes and plotting Juvie and Adult Populations

OpenStudy (dan815):

how come u didnt take the first eigen vector to be dominant

OpenStudy (usukidoll):

errr what?

OpenStudy (dan815):

the first eigen vector is a result of the dominant eigen value

OpenStudy (usukidoll):

so what should the command be?

OpenStudy (usukidoll):

OH! if I do the same thing but with 1 instead x.x

OpenStudy (dan815):

no i am asking you, how do you know which vector is the dominant eigen vector

OpenStudy (dan815):

is it not based of the dominant eigen value?

OpenStudy (usukidoll):

hold on it's in the

OpenStudy (usukidoll):

% Note that the "dominant" eigenvalue is D(2,2) and the corresponding % eigenvector is V(:,2)

OpenStudy (usukidoll):

?

OpenStudy (usukidoll):

is my code off or something? O_O

OpenStudy (usukidoll):

hmm the D one is the dominant eigenvalue and the V is the corresponding eigenvector?

OpenStudy (dan815):

the dominant eigen value is 1,1

OpenStudy (usukidoll):

how is it 1,1?

OpenStudy (usukidoll):

you mean this entry? 0.9491 + 0.0000i

OpenStudy (dan815):

yeah, isnt it the highest power

OpenStudy (dan815):

if u look at some stages for example D^2= [0.9..^2 0 0 0 (-0.4...+...i)^2 0 0 0 (-0.4..+...i)^2]

OpenStudy (dan815):

which eigen value will be playing the biggest role as the powers increase?

OpenStudy (usukidoll):

whoever has the highest value... so would the code be StAgeStr = V(:,2)/(sum(D(:,1))) ?

OpenStudy (usukidoll):

>> StAgeStr = V(:,2)/(sum(D(:,1))) StAgeStr = 0.9105 + 0.0000i -0.1888 - 0.2562i -0.0549 + 0.1771i hmm?

OpenStudy (dan815):

dont forget to make the 2, 1 in V too

OpenStudy (dan815):

and use V not D since u said u have to divide by eigen vector sum

OpenStudy (dan815):

okay listen, i think theres something wrong with ur eigen values actually

OpenStudy (usukidoll):

StAgeStr = V(:,2)/(sum(V(:,1))) gives me something like this >> StAgeStr = V(:,2)/(sum(V(:,1))) StAgeStr = 0.6779 + 0.0000i -0.1405 - 0.1908i -0.0409 + 0.1318i

OpenStudy (dan815):

ogm my bad!! i was looking at your 2nd matric not ur first

OpenStudy (usukidoll):

yeah I posted two remember. Matrix A was my first post and Matrix was my second post. I was wondering if I inputted them correctly because they seem so straight forward to tweak the code and apply what the example file gave

OpenStudy (dan815):

StAgeStr = V(:,1****)/(sum(V(:,1)))

OpenStudy (usukidoll):

>> StAgeStr = V(:,1****)/(sum(V(:,1))) StAgeStr = V(:,1****)/(sum(V(:,1))) | Error: Unexpected MATLAB operator.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!