質問

A robot Randomly searches a target. at each time step it makes the decision of going straight, left or right with a probability of 0.8,0.1,0.1 with a constant speed.

I have defined random variables(two dimensonal) to all of the 7 outcomes for 2 moves(left straight, left left, left right, straight right, straight straight, right right, right straight) according to their location and thus calculated the mean(4.27) and variance(1.8961). Can anyone help me how to carry out the monte carlo simulation for estimating the mean and the variance in matlab?

Thank you

役に立ちましたか?

解決 2

Thank you all for your help! I figured out a way with the help of the above answer!:

Step=random('uniform',0,1,1,2*(samples/run));
%% Defining directions
% for each step, if, 0<step<0.1,turn left;
% 0.1<step<0.2,turn right;
% step>0.2, go straight;
%% 7 outcomes

thus calculating the mean and variance through expectation!

他のヒント

Here Evaluating human visual search performance by Monte Carlo methods and heuristic model we used

R = normrnd(mu,sigma)

given mu (in your case mean(4.27)) and sigma ( radix of variance(1.8961)), then we used a vector method (8 directions)

5 4 3
 \|/ 
6-o-2
 /|\
7 0 1

where the mean was centered on to 4 (more or less like your case).

I hope this helps.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top