summaryrefslogtreecommitdiff
path: root/929/CH4/EX4.1/Example4_1.sce
blob: e97db7a1e48f39992e48fcc1210a0a339143d506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Example 4.1

clear;

clc;

fc=1*10^3;

fs=2*10^3;

AmaxdB=1;

AmindB=40;

e=((10^(AmaxdB/20))^(2)-1)^(1/2);

n1=((10^(AmindB/10))-1)/(e^2);

n=log(n1)/(2*log(fs/fc))+0.4;//0.4 is added in order to obtain a integer

printf("n=%.d",n);