summaryrefslogtreecommitdiff
path: root/67/CH6/EX6.1/example61.sce
blob: 5db3959ff6018806d50e706c6d94b661dd26fbec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//Example 6.1
clc;
disp('x(t)=3cos(50%pi*t)+10sin(300%pi*t)-cos(100%pi*t)');
w1=50*%pi;
w2=300*%pi;
w3=100*%pi;
f1=w1/(2*%pi);
f2=w2/(2*%pi);
f3=w3/(2*%pi);
if f1>f2 then
    if f1>f3 then
        disp(2*f1,'Nyquist rate=');
    else 
        disp(2*f3,'Nyquist rate=');
    end
else
    if f2>f3 then
        disp(2*f2,'Nyquist rate=');
    else
        disp(2*f3,'Nyquist rate=');
    end
end