Create x and y coordinates with available values
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(1 个)
Image Analyst
2022-7-2
Try
randomX = min(x) + range(x) * rand(1);
randomY = min(y) + range(y) * rand(1);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!