I have used this method to add to arrays in other programs but this it doesn't seem to work. I am confused and can't find a answer to the problem.
Error:
The sample size is: Error using horzcat
CAT arguments dimensions are not consistent.
Error in CalculateElo (line 14) playerGroup = [playerGroup r];
Code:
function [accuracy] = CalculateElo (referenceElo , sampleSize, lower, upper)
fprintf('The sample size is: %d', sampleSize);
% Popoulate an new array
playerGroup = [];
playerGroup = [playerGroup referenceElo];
for i=1:(sampleSize - 1)
%Create group size
a = 0;
b = 2000;
r = (b-a).*rand(1000,1) + a;
playerGroup = [playerGroup r];
end
rand(1000,1)is 1000 element row vecor. You cant add it to as a new column toplayerGroupif it has different number of rows.