Scatter plot random values

조회 수: 8 (최근 30일)
Swagato Das
Swagato Das 2020년 4월 9일
댓글: Walter Roberson 2022년 9월 6일
I have got a array of random variables: A=rand(1,25);
I have to scatter plot A within X and Y axis. The limits of both X axis and Y axis are 0 to 1. There is no relation between the random variables A and X,Y axis.
How can I do this? If at all this is possible, how can I obtain the x and y coordiantes of the 25 points that have been plotted?
Please help.
Thanks in advance.
  댓글 수: 9
Rik
Rik 2022년 9월 6일
What exactly did you try and how is that different from what you want? You should probably post your own question instead of trying to hijack this one.
Have a read here and here. It will greatly improve your chances of getting an answer.
Walter Roberson
Walter Roberson 2022년 9월 6일
You could get John d'Errico's interparc from the file exchange. Describe the curve by a series of line segments. Now generate the appropriate number of random points in the range 0 to 1 times the length of the curve, and interparc to find out the x y coordinates where those points fall. The points will be in random locations and they will be somewhere along the curve as required.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by