% FS for exp(-t/2) periodic signal
% Compelx exponential FS
clcclear;a=0b=piT0=b-aN=11F0=1/T0wi=[-N:N]*2*pi/T0;t=(a:0.2:b)';D=zeros(2*N+1,1);xt=exp(-0.5*t);fun1 = @(t)exp(-0.5*t);q1 = integral(fun1, a,b);D(N+1)=q1/T0;for n=1:N;fun2 = @(t)exp(-0.5*t).*(exp(-j*2*pi*n*F0*t));q2= integral(fun2,a,b,'ArrayValued',true);D(N+1+n)=q2/T0;fun3 = @(t)exp(-0.5*t).*(exp(j*2*pi*n*F0*t));q3= integral(fun2,a,b,'ArrayValued',true);D(N+1-n)=q3/T0;end% I Repeat the triangle pulse and plot for 7 periods
M=3; % The number of periods needed
tp=[];xtp=[];for i=-M:Mtp=[tp i*T0+t];xtp=[xtp xt];endsubplot(311)plot(tp,xtp)set(gca,'XMinorTick','on','YMinorTick','on')ylabel('Peiodic decayed exponential function')grid ongrid minorsubplot(312)stem(-N:N,abs(D))set(gca,'XMinorTick','on','YMinorTick','on')ylabel('abs D_n')grid ongrid minorsubplot(313)stem(-N:N,angle(D))set(gca,'XMinorTick','on','YMinorTick','on')ylabel('Angle D_n')grid ongrid minor
MATLAB: Hi , I have a problem with phase plot for Fourier series coefficients for periodic function exp(-t/2) , why phase plot is not odd function
fourier series coefficients - phase plot
Best Answer