function marshmat datatitle='Marsh Creek Spring/Summer Chinook'; code = 'MarshCr'; p = .4815; s1 = .018; s2 = .044; so = .8; b3 = 0; b4 = .216; b5 = 1; m = 2747; themat = [ 0 0 0 0 p*s1*m; s2 0 0 0 0 ; 0 so*(1-b3) 0 0 0 ; 0 0 so*(1-b4) 0 0 ; 0 so*b3 so*b4 so*b5 0 ]; stochplace = [ 0 0 0 0 1; 2 0 0 0 0; 0 3 0 0 0; 0 0 4 0 0; 0 3 4 5 0]; %this sez where to put what evar params [tmpa tmpb] = eig(themat); stableagestruc = tmpa(:,1)/sum(tmpa(:,1)); %pulse pulseagestruc=stableagestruc; pulseagestruc(1)=0; evarstream=[.13 .08]; evarocean=[.05 .05 .05]; %level of environmental variance; log(normal(0,evar)) ecorr=.8; %correlation between the evars when the survivorships are chosen from a multivariate normal; applies to evar 3+ %weight based on age of return %weight=cumsum(fliplr([0 0 0 .284 .716])); %weight based on % that become spawners weight=[0.0238 0.5396 0.6746 0.8 1]; obsstage = 5; %what stage is observed; in this case spawners mrt=sum((2:6).*[0 0 0 .0061/.0238 .0177/.0238]); save marshmat datatitle code themat stochplace stableagestruc pulseagestruc evarstream evarocean ecorr weight obsstage mrt;