summaryrefslogtreecommitdiff
path: root/887/CH2/EX2.1/2_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '887/CH2/EX2.1/2_1.sce')
-rwxr-xr-x887/CH2/EX2.1/2_1.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/887/CH2/EX2.1/2_1.sce b/887/CH2/EX2.1/2_1.sce
new file mode 100755
index 000000000..acbea52d1
--- /dev/null
+++ b/887/CH2/EX2.1/2_1.sce
@@ -0,0 +1,11 @@
+clc
+//ex2.1
+R_1=10;
+R_2=20;
+R_3=5;
+R_4=15;
+//We proceed through various combinations of resistances in series or parallel while we replace them with equivalent resistances We start with R_3 and R_4.
+R_eq_1=R_3+R_4; //R_3 and R_4 in series
+R_eq_2=1/((1/R_eq_1)+(1/R_2)); //R_eq_1 and R_2 in parallel
+R_eq=R_1+R_eq_2; //R_1 and R_eq_2 in series
+disp(R_eq,'Equivalent resistance in ohms')