Create x and y coordinates with available values

조회 수: 2 (최근 30일)
Muhamad Arung
Muhamad Arung 2022년 7월 2일
댓글: Muhamad Arung 2022년 7월 3일
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
KALYAN ACHARJYA 2022년 7월 2일
Already I provided the answer, any issue?
Muhamad Arung
Muhamad Arung 2022년 7월 3일
no, thankyou

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

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2022년 7월 2일
cor_xy=[randi(20),randi(30)]
cor_xy = 1×2
11 10

추가 답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by