Question: HI im trying to run my matlab code but when i hit run it does absolutely nothing can someone help me see whats wrong with

HI im trying to run my matlab code but when i hit run it does absolutely nothing can someone help me see whats wrong with this

Code:

%Question D

function [outcomes] = unfairCoinFlip(p0, flipsCount)

p0 = 1/3;

outcomes = unfairCoinFlip(p0, flipsCount, 'uint8');

for i = 100:flipsCount

x = rand;

if(x < p0)

outcomes(i) = 0; %Head

else

outcomes(i) = 1; %Tail

end

end

end

ok for the person that commented how do i go about fixing it? i thought the function is being called so where did i go wrong. also why would you say the question needs to be updated if you can see the mistakes ive made, that doesnt make any sense.

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!