% WrapperLimitCycleEQLatinHyperCubeIntialConditions % % Script delivers data for two patches % % Requirements: % Array output from LimitCycleEQ % PlotPhaseSpace % IntialConditions.mat from LatinHyperCubeSampler % % Geneva Mottet UAF 10-25-18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all % Parameters needed my limit cycle script f = 100; % f is k, carrying capasity but was tripping up the loop a = 50; b = 6; c = 4; % Horizonal Asyomtote of satration term d = 4; gamma = 10; % Loads the IntialConditions.mat from LatinHyperCubeSampler load('IntialConditions.mat') clear MaxNumOfCon % Scaling and number of intial conditions NumberOfConditions = 10; MaxHostPop = 100; MaxParaPop = MaxHostPop; % Sets the intial HA and PA HA0 = IntialConditions(1:NumberOfConditions,1)*MaxHostPop; PA0 = IntialConditions(1:NumberOfConditions,2)*MaxParaPop; HB0 = IntialConditions(1:NumberOfConditions,3)*MaxHostPop; PB0 = IntialConditions(1:NumberOfConditions,4)*MaxParaPop; % Migration Rates HostMig = 0; ParaMig = 0; % Sets loop parameters InterTime = 0.1; % Only need 0.1, not full range looplength = 1000; % Intializes for loop AllStotal = [];%zeros(length(HA0),length(InterTime),1000000); AllHAtotal = []; AllPAtotal = []; AllHBtotal = []; AllPBtotal = []; for k = 1:length(HA0) HA = HA0(k); PA = PA0(k); HB = HB0(k); PB = PB0(k); InterruptionTime = InterTime; LimitCycleEQ AllSAtotal(k,1:size(SAtotal)) = SAtotal; AllHAtotal(k,1:size(XAtotal)) = XAtotal(:,1); AllPAtotal(k,1:size(XAtotal)) = XAtotal(:,2); AllSBtotal(k,1:size(SBtotal)) = SBtotal; AllHBtotal(k,1:size(XBtotal)) = XBtotal(:,1); AllPBtotal(k,1:size(XBtotal)) = XBtotal(:,2); end % Cleans up arrays from for loop AllHAtotal(AllHAtotal(:,:) == 0) = NaN; AllPAtotal(AllPAtotal(:,:) == 0) = NaN; AllHBtotal(AllHBtotal(:,:) == 0) = NaN; AllPBtotal(AllPBtotal(:,:) == 0) = NaN; % Saves HA and PA from loop Version3DataHAtotal = AllHAtotal; Version3DataPAtotal = AllPAtotal; Version3DataHBtotal = AllHBtotal; Version3DataPBtotal = AllPBtotal; save('Version3LCDataHAtotalPatches.mat') save('Version3LCDataPAtotalPatches.mat') save('Version3LCDataHBtotalPatches.mat') save('Version3LCDataPBtotalPatches.mat')