Question: Write and test a Matlab function requiring iteration Write a Matlab function called hitTarget that will accept one scalar argument, the target sum of two

Write and test a Matlab function requiring iteration Write a Matlab function called hitTarget that will accept one scalar argument, the target sum of two random 6-sided dice rolls. The function generates and displays two random numbers between 1 and 6 (like dice rolls) until the sum of the two dice equals the target argument. Keep track of how many rolls it takes. Here is a sample run. >> hit Target(8) 5 2 6 3 2 2 4 3 3 5 Target met, it took 5 rolls
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
