diff options
Diffstat (limited to '1994/CH2/EX2.5/Example2_5.sce')
-rwxr-xr-x | 1994/CH2/EX2.5/Example2_5.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/1994/CH2/EX2.5/Example2_5.sce b/1994/CH2/EX2.5/Example2_5.sce new file mode 100755 index 000000000..15d621fac --- /dev/null +++ b/1994/CH2/EX2.5/Example2_5.sce @@ -0,0 +1,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)
|