Question: How to do Odds vs Evens Game in Matlab, this is what I have, but I need to plot a histogram of the random values

How to do Odds vs Evens Game in Matlab, this is whatHow to do Odds vs Evens Game in Matlab, this is what I have, but I need to plot a histogram of the random values used as well as write another script that skews the data to be in favor of evens, how can I do this?

%% Odds vs Evens %% Initial Conditions oddScore -0; evenScore0; %% Game 0n for n-1:100 throw-randi([1 100], 1, 1); if rem(throw, 2) # 0 % Using rem to determine if even or odd else end evenScore-evenScore+1; oddScore - oddScore+1; end Results fprintf("Score of odds is %d ", oddScore) fprintf("Score of evens is %d ", evenScore) if evenScore > oddScore elseif evenScore oddScore elseif evenScore

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!