blob: 15d621fac3dce70f4667ee2400e0e290e16f4168 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Chapter-2,Example2_5,pg 2_12
n=4
Vofs=5
Res=Vofs/((2^n)-1)
D1=bin2dec('1000')
Vo1=Res*D1
D2=bin2dec('1111')
Vo2=Res*D2
printf("output voltage1\n")
printf("Vo1=%.2f V\n",Vo1)
printf("output voltage2\n")
printf("Vo2=%.2f V\n",Vo2)
|