Digital Signal Processing Reference
In-Depth Information
Adding the first one−sixth of sinusoids
40
30
20
10
0
0
10
20
30
40
50
60
70
80
90
Approximating with all sinusoids
50
40
30
20
10
0
0
10
20
30
40
50
60
70
80
90
Figure 6.11: Approximating a saw-tooth wave with sinusoids.
x(i) = 1;
end
for i=41:60
x(i) = 0;
end
for i=61:80
x(i) = 1;
end
% Now we have the square wave as signal x
Figure 6.12 shows the approximation of the previous square wave for one-sixth
of sinusoids as well as all sinusoids.
% Make a combination saw-tooth square wave
for i=1:40
x(i) = i;
end
for i=41:80
x(i) = 40; %i-40;
end
% repeat
for i=81:120
x(i) = i-80;
end
for i=121:160
Search WWH ::




Custom Search