%This code is for creating sample outcome distributions for 2 outcome %generators and a vector of generator usage. The two are then merged, %resulting in a nTrial by 2 matrix x where column 2 represents the outcome %and column 1 maintains which action produced the outcome. nTrials=100; nActs=2; mu1 = 1; mu2 = 13; x1=mu1*ones(nTrials,1); x2=mu2*ones(nTrials,1); choice=round(rand(nTrials,1)+.2)+1; %this results in nActs=2; idx1=find(choice==1); idx2=find(choice==2); x=x1; x(idx2)=x2(idx2); x=[choice x];