Learning_const_per_participant=exprnd(1,20,1); %average(mu) is 1 and size is 20 by 1
meaning 20 participants
Mean=100;%mean task completion time on Trial 1
Stand_dev=25; %standard deviation across participants on Trial 1 equals 25 s
Task_completion=zeros(20,20); %20 trials for 20 participants
Task_completion(:,1)=normrnd(Mean,Stand_dev,[20 1]); %gives the first task completion
times for each participant where mu=100 sigma=25
Task_completion_exp=zeros(20,20); %20 trials for 20 participants
Task_completion_exp(:,1)=normrnd(Mean,Stand_dev,[20 1]); %gives the first task
completion times for each participant where mu=100 sigma=25
for i=1:19
Task_completion(:,i+1)=Task_completion(:,i).*((i+1).^(-
1*Learning_const_per_participant(:)));
Task_completion_exp(:,i+1)=Task_completion_exp(:,i).*(exp((i+1).*(-
1*Learning_const_per_participant(:))));
end
figure(1)
for t=1:20
subplot(5,4,t)
plot(1:20,Task_completion(t,:))
number=num2str(t);
xlabel('Trials'); ylabel('Time(seconds)');title('Participant',number); xlim([1 20])
end
figure(2)
Mean_Task_completion=mean(Task_completion); %Mean of participants for each trial
Mean_Task_completion(1,1)=100;
plot(1:20,Mean_Task_completion(:))
xlabel('Trials'); ylabel('Time(seconds)');title('Average Learning Curve'); xlim([1 20])
figure(3)
plot(1:20,Mean_Task_completion(:),1:20,Task_completion(5,:))
xlabel('Trials'); ylabel('Time(seconds)');title('Average Learning Curve vs Random Individual
L.C.'); xlim([1 20])
legend('Average Learning Curve','Random Individual Learning
Curve','Location',"eastoutside")
figure(4)
plot(1:20,Task_completion(5,:),1:20,Task_completion_exp(5,:))
xlabel('Trials'); ylabel('Time(seconds)');title('RILC vs RIEC'); xlim([1 20])
legend('Random Individual Learning Curve(RILC)','Random Individual Exponential
Curve(RIEC)','Location',"eastoutside")
figure(5)
Mean_Task_completion_exp=mean(Task_completion_exp);
plot(1:20,Mean_Task_completion(:),1:20,Mean_Task_completion_exp(:))
xlabel('Trials'); ylabel('Time(seconds)');title('Mean Learning Curve vs Mean Exponential
Curve'); xlim([1 20])
legend('Mean Learning Curve','Mean Exponential Curve','Location',"eastoutside")
figure(6)
plot(1:20,Task_completion_exp(5,:),1:20,Mean_Task_completion_exp(:))
meaning 20 participants
Mean=100;%mean task completion time on Trial 1
Stand_dev=25; %standard deviation across participants on Trial 1 equals 25 s
Task_completion=zeros(20,20); %20 trials for 20 participants
Task_completion(:,1)=normrnd(Mean,Stand_dev,[20 1]); %gives the first task completion
times for each participant where mu=100 sigma=25
Task_completion_exp=zeros(20,20); %20 trials for 20 participants
Task_completion_exp(:,1)=normrnd(Mean,Stand_dev,[20 1]); %gives the first task
completion times for each participant where mu=100 sigma=25
for i=1:19
Task_completion(:,i+1)=Task_completion(:,i).*((i+1).^(-
1*Learning_const_per_participant(:)));
Task_completion_exp(:,i+1)=Task_completion_exp(:,i).*(exp((i+1).*(-
1*Learning_const_per_participant(:))));
end
figure(1)
for t=1:20
subplot(5,4,t)
plot(1:20,Task_completion(t,:))
number=num2str(t);
xlabel('Trials'); ylabel('Time(seconds)');title('Participant',number); xlim([1 20])
end
figure(2)
Mean_Task_completion=mean(Task_completion); %Mean of participants for each trial
Mean_Task_completion(1,1)=100;
plot(1:20,Mean_Task_completion(:))
xlabel('Trials'); ylabel('Time(seconds)');title('Average Learning Curve'); xlim([1 20])
figure(3)
plot(1:20,Mean_Task_completion(:),1:20,Task_completion(5,:))
xlabel('Trials'); ylabel('Time(seconds)');title('Average Learning Curve vs Random Individual
L.C.'); xlim([1 20])
legend('Average Learning Curve','Random Individual Learning
Curve','Location',"eastoutside")
figure(4)
plot(1:20,Task_completion(5,:),1:20,Task_completion_exp(5,:))
xlabel('Trials'); ylabel('Time(seconds)');title('RILC vs RIEC'); xlim([1 20])
legend('Random Individual Learning Curve(RILC)','Random Individual Exponential
Curve(RIEC)','Location',"eastoutside")
figure(5)
Mean_Task_completion_exp=mean(Task_completion_exp);
plot(1:20,Mean_Task_completion(:),1:20,Mean_Task_completion_exp(:))
xlabel('Trials'); ylabel('Time(seconds)');title('Mean Learning Curve vs Mean Exponential
Curve'); xlim([1 20])
legend('Mean Learning Curve','Mean Exponential Curve','Location',"eastoutside")
figure(6)
plot(1:20,Task_completion_exp(5,:),1:20,Mean_Task_completion_exp(:))