开发者

How do you draw circles in random locations in MATLAB

开发者 https://www.devze.com 2023-02-01 18:43 出处:网络
What would be the program code for drawing five circles in random posi开发者_如何学Gotions in MATLAB?You can do it simply with SCATTER or PLOT function using RAND to generate random X and Y coordinate

What would be the program code for drawing five circles in random posi开发者_如何学Gotions in MATLAB?


You can do it simply with SCATTER or PLOT function using RAND to generate random X and Y coordinates.

scatter(rand(5,1),rand(5,1))

You can draw circle also using famous CIRCLE function from the File Exchange.


Try these two functions together:

http://www.mathworks.com/help/toolbox/pde/ug/pdecirc.html
http://www.mathworks.com/help/techdoc/ref/rand.html

0

精彩评论

暂无评论...
验证码 换一张
取 消