1) Write the MATLAB code to generate a random number between 1 and 3 using the r
ID: 642637 • Letter: 1
Question
1) Write the MATLAB code to generate a random number between 1 and 3 using the randi function. You can find more information about randi AWWA mathworks co helplmatlablreflrandi.html 2) Consider the Monty Hall problem (h not fa can find it here: http:ll ose en wikipedia o ki/Monty Hall problem or watch the following video until 1:07 http:ll outub atch mhlc eGIGg a) the pseudo-code to ask the user which door they would like to initially choose. Also write the code to pick the winning door at random (Hint: store these in variables named initial choice and winning door). b) Based on your solution to part A, write the pseudo-code to determine which door is revealed to the user as a goat. Store the revealed door number in a variable named revealed door. c) write the pseudo-code for the final decision to ask if the user wants to change doors, and then reveal whether or not won a car or a goat. Store their response in a variable named change door. You can expect the user's response to be a 'y" for yes, and an 'n' for no. Determining whether they win or lose will depend on the initial choice, winning door and change door values.Explanation / Answer
1.
2.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.