Question: Write a Matlab program called CoinTosses to carry out the experiment of tossing a fair coin n times where n is a user input. Print
Write a Matlab program called CoinTosses to carry out the experiment of tossing a fair coin n times where n is a user input.
Print out the outcome (example : for n=5, THTTH)
Calculate the probability of getting Heads and the probability of getting Tails.
This is what I have so far.. I am also not sure what I should be typing into the command window. When I type n =5, I only get 5 outcome.

function toss- cointosses(n, k) ok is probability of heads ninput( 'How many times do you want to toss a fair coin?:'); 4 head0; for i- 1:n 7 if rand
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
