I am trying to plot six concentric circles using meshgrid() and plot(). The circles' radii vary between 0.5 and 1.75 (with intervals of 0.25). I am wondering whether the code below is sufficiently efficient and whether indeed it should be performed as delineated below:
theta = linspace(0, 2*pi, 50); [X, Y] = meshgrid(0.5:0.25:1.75, theta); plot(a+cos(Y).*X, b+sin(Y).*X);
No products are associated with this question.
You could conserve a little memory if you did it this way, but I don't know anyone who cares about efficiency for such a small plotting task,
theta = linspace(0, 2*pi, 50).'; R=0.5:0.25:1.75;
Play games and win prizes!Learn more