Matlab实现笛卡尔心型线,工科生的浪漫
[置顶]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

