Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clc
- clear all
- close all
- N=256
- T=pi
- omega0=2*pi/T
- Ts=T/N
- nx=0:1:N-1
- tx=0:Ts:(N-1)*Ts
- xn=exp(-nx*Ts/2)
- figure(1)
- plot(tx,xn)
- xlabel('n')
- ylabel('x(t)=exp(-t/2)')
- xlim([0 3.14])
- ylim([0 1])
- M=10
- xn(1)=(exp(-0)+exp(-pi/2))/2
- ak=exp
- fscoefficients(xn,T,M)
- k=0:1:length(ak)-1
- [akangle,akmag]=cart2pool(real(ak),imag(ak))
- figure(2)
- subplot(2,1,1)
- stem(k,akmag)
- xlabel('k')
- ylabel('|a_k|')
- title('phase spectra plot')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement