summaryrefslogtreecommitdiff
path: root/2702/CH1/EX1.22/Ex_1_22.sce
diff options
context:
space:
mode:
Diffstat (limited to '2702/CH1/EX1.22/Ex_1_22.sce')
-rw-r--r--2702/CH1/EX1.22/Ex_1_22.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/2702/CH1/EX1.22/Ex_1_22.sce b/2702/CH1/EX1.22/Ex_1_22.sce
new file mode 100644
index 000000000..ec07d04bf
--- /dev/null
+++ b/2702/CH1/EX1.22/Ex_1_22.sce
@@ -0,0 +1,18 @@
+// Exa 1.22
+clc;
+clear;
+close;
+// Given data
+vo= -10;// in V
+i_f= 1;// in mA
+i_f= i_f*10^-3;//in A
+// Formula vo= -i_f*Rf
+Rf= -vo/i_f;// in Ω
+// The output voltage, vo= -(v1+5*v2) (i)
+// vo= -Rf/R1*v1 - Rf/R2*v2; (ii)
+// Comparing equations (i) and (2)
+R1= Rf/1;// in Ω
+R2= Rf/5;// in Ω
+disp(Rf*10^-3,"The value of Rf in kΩ is : ")
+disp(R1*10^-3,"The value of R1 in kΩ is : ")
+disp(R2*10^-3,"The value of R2 in kΩ is : ")