summaryrefslogtreecommitdiff
path: root/40/CH8/EX8.10/Exa_8_10.sce
blob: d9676ae26ee0289e4ef58a2b1a78c9ba40f6bf38 (plain)
1
2
3
4
5
6
7
8
9
//DFS of sampled periodic signals
xn=[0 ones(2:16) 0 -ones(18:32)];
XDFS=0.032*dft(xn,-1);
for i=1:length(XDFS)
    if (abs(XDFS(i))<0.000001) then
        XDFS(i)=0;
    end
end
disp(XDFS,'The DFS of x[n] is');