Create x and y coordinates with available values

2 visualizaciones (últimos 30 días)
Muhamad Arung
Muhamad Arung el 2 de Jul. de 2022
Comentada: Muhamad Arung el 3 de Jul. de 2022
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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Jul. de 2022
Already I provided the answer, any issue?
Muhamad Arung
Muhamad Arung el 3 de Jul. de 2022
no, thankyou

Iniciar sesión para comentar.

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Jul. de 2022
cor_xy=[randi(20),randi(30)]
cor_xy = 1×2
11 10

Más respuestas (1)

Image Analyst
Image Analyst el 2 de Jul. de 2022
Try
randomX = min(x) + range(x) * rand(1);
randomY = min(y) + range(y) * rand(1);

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by