Create x and y coordinates with available values

I have a value of x(0 - 20) and a value of y (0-30) then I will coordinate the X horizontal axis and Y vertical axis with these values, how is th code to make the x and y coordinates? and determine a random point between x and y for example (1,2)

댓글 수: 2

Already I provided the answer, any issue?
no, thankyou

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

 채택된 답변

추가 답변 (1개)

Image Analyst
Image Analyst 2022년 7월 2일
Try
randomX = min(x) + range(x) * rand(1);
randomY = min(y) + range(y) * rand(1);

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

Community Treasure Hunt

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

Start Hunting!

Translated by