summaryrefslogtreecommitdiff
path: root/1184/CH7/EX7.4/Ex7_4.sce
blob: a0d91e76ecffab194b4ddb1f8ec1859deefb0574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Example 7-4,Page No - 233

clear
clc

Vm = 1
Vin = 0.25
mu =255

Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)
gain =Vout/Vin

printf('The output voltage of the compander %.2f volt',Vout)
printf('\n Gain of the compander is %d',gain)