Course Solutions Uncategorized (Solved) : Change Matlab Script Rwtorad Even Times Probability 2 3 Choose X Direction 1 3 Choose Y Di Q30268975 . . . .

(Solved) : Change Matlab Script Rwtorad Even Times Probability 2 3 Choose X Direction 1 3 Choose Y Di Q30268975 . . . .

 

Change the Matlab script for the RWtoRad so that at even timesthen the probability is 2/3 to choose the x direction and 1/3 tochoose the y direction (but still 1/2 probability for both + and ?steps for the sign). Make it such that at odd times it is opposite:probability 1/3 to choose the x-direction and 2/3 to choose the ydirection. Then run this for R = 100 and also run the loop-erasealgorithm.

Matlab Code:

Rad = 1000;
n = 10*Rad^2;
Dir = round(rand(n,1));
Sign = round(rand(n,1))*2-1;
XSteps = Dir.*Sign;
YSteps = (1-Dir).*Sign;
X = [0;cumsum(XSteps)];
Y = [0;cumsum(YSteps)];
Bool = (X.^2+Y.^2>(Rad-1)^2);
Lngth = min(find(Bool));
Xred = X(1:Lngth);
Yred = Y(1:Lngth);

Included = ones(1,Lngth);
for t=1:Lngth,
   

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : Respond to the following questions using the weekly chapter material and relevant outside research sources to strengthen your answ(Answered) : Respond to the following questions using the weekly chapter material and relevant outside research sources to strengthen your answ

Respond to the following questions using the weekly chapter material and relevant outside research sources to strengthen your answers. Follow APA formatting requirements for in-text cites and for your Reference