Sanyi
Sanyi

Reputation: 35

How do you draw circles in random locations in MATLAB

What would be the program code for drawing five circles in random positions in MATLAB?

Upvotes: 1

Views: 2259

Answers (2)

yuk
yuk

Reputation: 19870

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.

Upvotes: 3

Related Questions