Matlab實(shí)現(xiàn)笛卡爾心型線,工科生的浪漫

[置頂]clear all
clc
syms a x;
for t = 0.2:0.45:52.1
????clf;
????Lf1='(-x).^(2/3)+(0.9*(3.3-(-x).^2).^0.5)*sin(';
????Rf1='x.^(2/3)+(0.9*(3.3-x.^2).^0.5)*sin(';
????f2=num2str(t);
????Lf3='*pi*(-x))';
????Rf3='*pi*x)';
????Lf=【Lf1,f2,Lf3】;
????Rf=【Rf1,f2,Rf3】;
????h1=ezplot(Lf);
????set(h1,'color','blue')
????hold on;
????h2=ezplot(Rf);
????set(h2,'color','red')
????axis(【-2 2 -1.5 2.5】)
????grid on;
????pause(0.1);
end
標(biāo)簽: