I want to modify the following program like the following figure.
a=0.5; b=2; m = 1000;x = zeros(m,1);y = zeros(m,1);theta = linspace(0,2*pi,m);for k = 1:m x(k) = a * cos(theta(k)); y(k) = b * sin(theta(k));endfor a=0:0.5:1 for xc = 1:-1:0R = [cos(a) -sin(a); ... sin(a) cos(a)];rCoords = R*[x' ; y']; xr = rCoords(1,:)'; yr = rCoords(2,:)'; yc = 1;grid on;axis equal; end hold on plot(xr+xc,yr+yc,'b');end
Best Answer