Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

No idea where to start with this question (very new to matlab):

  1. Feb 14, 2013 #1
    Write a Matlab function mycirc(c,r) that will plot the circle whose center is at c[x0,y0] and whose radius is r. Then plot 100 random circles with c,r chosen randomly from the interval 0 to 1.
  2. jcsd
  3. Feb 16, 2013 #2
    There are several ways to do this. One is to use the parametric equation for circle (think radius and iteration over angle), another is to use the rectangle command's curvature argument. Look up rand in help to see how you might choose c & r. Look up the for or while loops to see how you might create any given number of such circles.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook