%椭圆->圆->椭圆->双曲线
clear
syms a x y
eq=1/a^2*x^2 +y^2/(25-a^2)-1;
aa=[0.5:0.5:4.5,5.5:8];
[m,n]=size(aa);
for i=1:n
eq1=subs(eq,a,aa(i));
ezplot(eq1,[-20 20])
drawnow
axis([-20 20 -10 10])
pause(0.5)
end
%椭圆->圆->椭圆->双曲线
clear
syms a x y
eq=1/a^2*x^2 +y^2/(25-a^2)-1;
aa=[0.5:0.5:4.5,5.5:8];
[m,n]=size(aa);
for i=1:n
eq1=subs(eq,a,aa(i));
ezplot(eq1,[-20 20])
drawnow
axis([-20 20 -10 10])
pause(0.5)
end