This is my code is running and making histogram as well, but not at the right place.
A=input('How many tossing would you like to do? ')x= rand(A,1); if(x<0.5), toss = -1; %Head
else toss = 1; %Tail
end hist(x,-2:2)
Asyou can se one bar is at 0 and the other is at 1. I would like if Heads been shown at -1 and Tails at 1.
Thank you for any help.
Best Answer