code of Plot an Ellipse
clear all
close all
clc
t = linspace(0, 2*pi, 200);
xt = r1 * cos(t) + xc;
yt = r2 * sin(t) + yc;
% aply rotation by angle theta
cot = cos(theta); sit = sin(theta);
x = xt * cot – yt * sit;
y = xt * sit – yt * cot;
% draw the curbe
plot(x, y, ‘-‘);clear all
close all
clc
t = linspace(0, 2*pi, 200);
xt = r1 * cos(t) + xc;
yt = r2 * sin(t) + yc;
% aply rotation by angle theta
cot = cos(theta); sit = sin(theta);
x = xt * cot – yt * sit;
y = xt * sit – yt * cot;
% draw the curbe
plot(x, y, ‘-‘); clear all
close all
clc
t = linspace(0, 2*pi, 200);
xt = r1 * cos(t) + xc;
yt = r2 * sin(t) + yc;
% aply rotation by angle theta
cot = cos(theta); sit = sin(theta);
x = xt * cot – yt * sit;
y = xt * sit – yt * cot;
% draw the curbe
plot(x, y, ‘-‘); ellipse MATLAB Answers — New Questions