Plotting random points in matlab
古いコメントを表示
Hello everyone, I have this figure which is shown below. I am getting a certain pattern of points every time i run my simulation. I mean, although the points are different every time but there is always some pattern in these points. Why is this, i don't know.

6 件のコメント
José-Luis
2014 年 6 月 18 日
Sorry, but unless you give some more details, we are limited to venturing wild guesses. Also, this is not really a Matlab question.
Aftab Ahmed Khan
2014 年 6 月 18 日
Aftab Ahmed Khan
2014 年 6 月 18 日
Star Strider
2014 年 6 月 18 日
The rand function returns uniformly-distributed pseudorandom numbers on the interval (0,1).
Aftab Ahmed Khan
2014 年 6 月 18 日
Star Strider
2014 年 6 月 18 日
That is because xx and yy are scaled, so that the radius component is always on the interval (0,r) and the quadrant is defined by the sign of the sin and cos (respectively) of different random numbers, this time on the interval (0,2*pi), so those parts of the calculation are defined on the interval (-1,1).
The end result is that xx and yy are each independently defined on the same interval for both the radius and angle compoents, but are different because the values returned by rand are different. Here, it looks as though they will always end up on an angle that is some odd integer multiple of (pi/4) radians, with varying radii.
Those explain posxy(:,1:2). I don’t understand posxy(:3).
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および 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!

