clear all

load('DataFullr0Master.mat','chngpars','parnames','par0values','OutData'); 

level=1;
popthrhd=[1e-4, 1e-2, 1e-1, 1e-0, 1e+1, 1e+2];
popthrhdnmbr=length(popthrhd);
%rows=[1:5,5+(level:popthrhdnmbr:6*popthrhdnmbr)];

pta0=min(OutData(:,2))-1e-4;
pta1=max(OutData(:,2))+1e-4;
ptb=min(OutData(:,3));
ptc=max(OutData(:,4));
indx=(OutData(:,1)<=50 & OutData(:,2)>pta0 & OutData(:,2)<pta1 ...
    & OutData(:,3)<ptb+1e-4 & OutData(:,3)>ptb-1e-4...
    & OutData(:,4)<ptc+1e-4 & OutData(:,4)>ptc-1e-4); 
%plotOutData=OutData(indx,rows);
plotOutData=OutData(indx,:);

stdon=1; % binary.

bmscale=20;
Binsize=(7-(-1))/30;

xaxispts=log(plotOutData(indx,2))/log(10);


plantmassmean=mean(plotOutData(:,6));
herbivoremassmean=mean(plotOutData(:,7));
carnivoremassmean=mean(plotOutData(:,8));

plantmassstd=std(plotOutData(:,6));
herbivoremassstd=std(plotOutData(:,7));
carnivoremassstd=std(plotOutData(:,8));


%YY0=bmscale*log((plotOutData(indx1,8)+plotOutData(indx1,6)+plotOutData(indx1,7))')/log(10);


plot(xaxispts,plantmassmean,'gs',...
        xaxispts,herbivoremassmean,'bs',...
        xaxispts,carnivoremassmean,'rs')
return
 Bms=log(plotOutData(:,8)+plotOutData(:,6)+plotOutData(:,7))/log(10);
   
     yzpms=[yzpms, mean(Bms(ind1))];
   