In result1 = [(i+1),i] you overwrite result1 repeatedly instead of accumulating the results. A solution would be:
result = [];
for i = 1:3
...
result = [result, i];
...
But this would not count the red and green balls. Better:
red = 0;
green = 0;
for i = 1:3
if rand > 0.5 % Inside the loop, not once before the loop
red = red + 1
...
You can either collect the green balls also, or use the fact, that the number of red and green balls must be 3.
Finally fprintf() helps:
fprintf('Red balls: %d\n', red)