How plot a messy random-size circles in MATLAB? -
i going draw figure such below picture in matlab r2014b: . this figure consists of many circles different (random) colors , random sizes. how possible plot such figure in matlab r2014b? without spelling out code: pick initial circle, e.g. position [0,0] , radius 1. initialise list positions , radii. pick random position , radius r . if circle not in big 1 (i.e. sqrt(pos(1)^2+pos(2)^2) + r > 1 ) continue 3. if overlap other circles (distance between positions > sum of radii), continue 3 add circle list, continue 3 update: example alright, wanted try this. i'm sure not best implementation, but: % set number of circles plot n = 200; radii = zeros(n, 1); pos = zeros(n, 2); allcolours = lines(n); % main loop idx = 1:n is_good = false; % generate random positions , radii until have hit while ~is_good pos(idx, :) = rand(1, 2)*2 - 1; radii(idx) = rand * (1 - max(radii)); if ((sqrt(sum(pos(idx, :).^2)) + radii(idx) )...