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
KALYAN ACHARJYA
2022년 7월 2일
Already I provided the answer, any issue?
Muhamad Arung
2022년 7월 3일
채택된 답변
추가 답변 (1개)
Image Analyst
2022년 7월 2일
Try
randomX = min(x) + range(x) * rand(1);
randomY = min(y) + range(y) * rand(1);
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!