Random walk (based in random angles). Math help....!!
조회 수: 11 (최근 30일)
이전 댓글 표시
I created two diferent movement rules for animal path simulation in Matlab, based on some field data. I used iterated steps (iterated algorithm), ramdomizing the angle of direction.
The first path rule is a complete (I suppose) random movement, where the direction of the next step could vary ramdomly from 0 to 360 (or 180 to -180) degrees.
And in the second path rule the steps direction are more correlated with the previous steps, as the angle of the next step could vary only 30 degrees (from -15 to 15 degrees).
The randomized variable is always the angle of direction. And for these these two path patterns the path lenght does not change during the displacement.
I am trying to deal with statistical theory, but so far Iam a little confuse about the simulations, so I came ask for some help:
- I created a “random walk” and a “correlated random walk” correct ? These are non stationary process right?
- I need to symbolize mathematically those rules (for scientific writing). For this I first should specify the media, the variace, and the distribuition correct ? But particulary at this point Iam stucked. Could you help me ? I really tried the bibliography but until now I havent had sucess understanding.
Thank you in advance.
댓글 수: 2
Walter Roberson
2013년 11월 15일
This appears to be essentially a correlated random walk from a random starting point on the circle one unit in radius from the origin.
Image Analyst
2013년 11월 15일
편집: Image Analyst
2013년 11월 15일
I moved Paulo's "Answer" moved here since it's a comment to Walter, not reall an answer in itself: Paulo, see my answer below.
Thank you for the insight! I look for some references with circular random walk and it really seens to be the case. But I am still stucked with the measures (media, variance, distributions)
As for giving more informations:
In fact I created two movements paths. One of them I hope is a random walk and the another a correlated random walk.
The random walk I allowed to random the angle direction in every steps, so it sorted an angle from 360 options, so: media zero, and uniform distribution ? and how about the variance ?
답변 (1개)
Image Analyst
2013년 11월 15일
Try this:
maxNumberOfSteps = 10; % or whatever
radius = 1;
x = zeros(1, maxNumberOfSteps)
y = zeros(1, maxNumberOfSteps)
for stepNumber = 2 : maxNumberOfSteps
% Pick one of the two angle strategies.
% angle(stepNumber) = 360*rand(1); % Independent.
angle(stepNumber) = angle(stepNumber-1) + 30 * rand(1) - 15; % Correlated.
x(stepNumber) = x(stepNumber - 1) + radius * cosd(angle(stepNumber));
y(stepNumber) = y(stepNumber - 1) + radius * sind(angle(stepNumber));
cla;
plot(x, y, 'bo-', 'LineWidth', 3, 'MarkerSize', 15);
grid on;
end
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
댓글 수: 2
Image Analyst
2013년 11월 15일
Here's an earlier random walk I wrote that calculates distance and labels the points. See attached file in blue below.
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!