# Lab 7:# Name:# I worked on this code with:# Please do all of your work for this week's lab in this worksheet. If# you wish to create other worksheets for scratch work, you can, but# this is the one that will be graded. You do not need to do anything# to turn in your lab. It will be collected by your TA at the beginning# of (or right before) next week’s lab.# Be sure to clearly label which question you are answering as you go and to# use enough comments that you and the grader can understand your code.
#34BB1=BB*e_vector1BB2=BB*e_vector2plot(e_vector1,color="blue")+plot(e_vector2,color="pink")+plot(BB1)+plot(BB2,color="purple")#BBq plot above, the first eigenvector was shorter than the original vector when multiplied by the matrix. BB2 eigenvector was longer,
#39L=matrix(RDF,[[0,0,35315],[0.00003,0.777,0],[0,0.071,0.949]])R=L.eigenvectors_right()R#Long Term growth rate of lionfish population is thelargets eigenvalue. 1.1344782568718599. Long vector proportions eigenvector dominant eigenvalue (L, J, A)[(0.999999995962624, 8.392118765878533e-05, 3.212454346004658e-05)]
#40v=vector([35,10,4])foriinsrange(0,100,1):v=L*vLproportion=v/sum(v)Jproportion=v/sum(v)Aproportion=v/sum(v)show("Lproportion1:",Lproportion)show("Jproportion1:",Jproportion)show("Aproportion1:",Aproportion)#This shows that 8.39e-5 are juveniles and 3.21e-5 are adults. Numbers are similar to the values of the dominant eigenvector in previously.
#41#The dominant eigenvalue has to be equal to 1 for it to be constant#absolute value of the dominant eigenvalue has to be less than 1 for it to be declining.
#42.3 Reduced juvenile in adult equationL=matrix(RDF,[[0,0,35315],[0.00003,0.777,0],[0,0.0000000003,0.949]])R=L.eigenvectors_right()R##Reducing the larvae by reducing the number of adults that become larvae gave the biggest reduction in growth rate