From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 929/CH2/EX2.8.a/Example2_8_a.sce | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 929/CH2/EX2.8.a/Example2_8_a.sce (limited to '929/CH2/EX2.8.a') diff --git a/929/CH2/EX2.8.a/Example2_8_a.sce b/929/CH2/EX2.8.a/Example2_8_a.sce new file mode 100755 index 000000000..3877f3106 --- /dev/null +++ b/929/CH2/EX2.8.a/Example2_8_a.sce @@ -0,0 +1,48 @@ +//Example 2.8(a) + +clear; + +clc; + +R1=10*10^3; + +R3=R1; + +R2=100*10^3; + +R4=R2; + +//For first pair of inputs (v1, v2)=(-0.1 V, +0.1V) +v11=-0.1; + +v21=0.1; + +vo1=(R2/R1)*(v21-v11); + +vcm1=(v11+v21)/2; + +//For Second pair of inputs (v1, v2)=(4.9 V, 5.1V) + +v12=4.9; + +v22=5.1; + +vo2=(R2/R1)*(v22-v12); + +vcm2=(v12+v22)/2; + +//For Third pair of inputs (v1, v2)=(9.9 V, 10.1 V) + +v13=9.9; + +v23=10.1; + +vo3=(R2/R1)*(v23-v13); + +vcm3=(v13+v23)/2; + +printf("vo for (-0.1 V,+0.1 V)=%.2f V",vo1); + +printf("\nvo for (4.9 V,5.1 V)=%.2f V",vo2); + +printf("\nvo for (9.9 V,10.1 V)=%.2f V",vo3); \ No newline at end of file -- cgit