Hi,
I'm trying to get 3 circles stacked ontop of eachother (a snowman) each of a different size (heights of: 80, 50, 30). I'm not sure how to use the same equation (given below) for each of the different parameters. I've tried using a matrix but matlab isn't liking that. Am I making an obvious mistake?
I want to make it look neat so don't want to write out the same equation multiple times.
angles = linspace(0, 2*pi, 500);radius = [40 25 15];CenterX = [0 0 0];CenterY = [40 105 145];x = radius * cos(angles) + CenterX;y = radius * sin(angles) + CenterY;plot(x, y, 'b-', 'LineWidth', 2);hold on;plot(CenterX, CenterY, 'k+', 'LineWidth', 3, 'MarkerSize', 14);grid on;axis equal;xlabel('X', 'FontSize', 14);ylabel('Y', 'FontSize', 14);
Best Answer