






clc;clear;h = animatedline;xl=xlabel('cos(\omegat)');% yl=ylabel('sin(\omegat)');% grid on;title('\omega = 1rad/s Made by J Pan')axis([-1,1,-1,1]);axis square;N = 100;t=linspace(0,2*pi,N);w=1;x=cos(w*t);y=sin(w*t);a = tic; % start timerfor k = 1:N addpoints(h,x(k),y(k)); hold on quiver(0,0,x(k)*1.1,y(k)*1.1) b = toc(a); % check timer if b > (1/90) drawnow % update screen every 1/30 seconds a = tic; % reset timer after updating endend


图片来源网络




三、拉普拉斯变换(原来就是那么回事)傅里叶变换能帮我们解决很多问题,一经问世后便受到广大工程师们的喜爱,因为它给人们提供了一扇不同的窗户来观察世界,从这个窗户来看,很多事情往往变得简单多了。但是,别忘了,傅里叶变换有一个很大局限性,那就是信号必须满足狄利赫里条件才行,特别是那个绝对可积的条件,一下子就****掉了一大批函数。比如函数



图片来自:https://www.zhihu.com/question/22102732/answer/369089156









clc;clear;h = animatedline;h1=gcf;view(3);xl=xlabel('cos(-\omegat)');% yl=ylabel('sin(-\omegat)');% zl=zlabel('t');% set(xl,'Rotation',30);% set(yl,'Rotation',-30);%grid on;title('\omega = 1rad/s Made by J Pan')axis([-1,1,-1,1,0,4*pi])N = 200;t=linspace(0,4*pi,N);w=1;x=cos(-w*t);y=sin(-w*t);a = tic; % start timerfor k = 1:N addpoints(h,x(k),y(k),t(k)); hold on line([0 x(k)],[0 y(k)],[t(k) t(k)],'Color','red') b = toc(a); % check timer if b > (1/90) drawnow % update screen every 1/30 seconds a = tic; % reset timer after updating endend


clc;clear;h = animatedline;h1=gcf;view(3);xl=xlabel('cos(-\omegat)');% yl=ylabel('sin(-\omegat)');% zl=zlabel('t');% set(xl,'Rotation',30);% set(yl,'Rotation',-30);%grid on;title('\omega = 1rad/s Made by J Pan')axis([-1,1,-1,1,0,4*pi])N = 200;t=linspace(0,4*pi,N);w=1;sig=0.1;x=exp(-sig*t).*cos(-w*t);y=exp(-sig*t).*sin(-w*t);a = tic; % start timerfor k = 1:N addpoints(h,x(k),y(k),t(k)); hold on line([0 x(k)],[0 y(k)],[t(k) t(k)],'Color','red') b = toc(a); % check timer if b > (1/90) drawnow % update screen every 1/30 seconds a = tic; % reset timer after updating endend





