x=0:0.1:20;
y=1-1/sqrt(1-0.3^2)*exp(-0.3*x).*sin(sqrt(1-0.3^2)*x+acos(0.3));
plot(x,y)
h=line(0,0,'color','red','marker','.','markersize',40,'erasemode','xor');
for i=1:length(x)
set(h,'xdata',x(i),'ydata',y(i));
pause(0.005)
drawnow
end
通信人家园 (https://www.txrjy.com/) | Powered by C114 |