summaryrefslogtreecommitdiff
path: root/165/CH4/EX4.22/ex4_22.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /165/CH4/EX4.22/ex4_22.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '165/CH4/EX4.22/ex4_22.sce')
-rw-r--r--165/CH4/EX4.22/ex4_22.sce50
1 files changed, 50 insertions, 0 deletions
diff --git a/165/CH4/EX4.22/ex4_22.sce b/165/CH4/EX4.22/ex4_22.sce
new file mode 100644
index 000000000..4d3fe0805
--- /dev/null
+++ b/165/CH4/EX4.22/ex4_22.sce
@@ -0,0 +1,50 @@
+//Example 4.22
+close;
+clc;
+
+E=3; //in volts
+Rm=100; //In ohms
+Im=1*10^-3; //in amperes
+//Rs value that will give FSD current
+Rs=E/Im-Rm;
+printf('\nValue of Rs that will limit Current to FSD = %.2f k ohm\n',Rs/1000)
+
+function [Rx]=deflection(x,Rs,Rm)
+ Rx=(Rs+Rm)/x-(Rs+Rm);
+endfunction
+
+//For 20% deflection
+funcprot(0);
+x=20/100; //x=I/Im
+[Rx]=deflection(x,Rs,Rm);
+printf('\nValue of Rx that will 20 percent deflection = %.2f k ohm\n',Rx/1000)
+
+//For 40% deflection
+funcprot(0);
+x=40/100; //x=I/Im
+[Rx]=deflection(x,Rs,Rm);
+printf('\nValue of Rx that will 40 percent deflection = %.2f k ohm\n',Rx/1000)
+
+//For 50% deflection
+funcprot(0);
+x=50/100; //x=I/Im
+[Rx]=deflection(x,Rs,Rm);
+printf('\nValue of Rx that will 50 percent deflection = %.2f k ohm\n',Rx/1000)
+
+//For 75% deflection
+funcprot(0);
+x=75/100; //x=I/Im
+[Rx]=deflection(x,Rs,Rm);
+printf('\nValue of Rx that will 75 percent deflection = %.2f k ohm\n',Rx/1000)
+
+//For 90% deflection
+funcprot(0);
+x=90/100; //x=I/Im
+[Rx]=deflection(x,Rs,Rm);
+printf('\nValue of Rx that will 90 percent deflection = %.2f k ohm\n',Rx/1000)
+
+//For 100% deflection
+funcprot(0);
+x=100/100; //x=I/Im
+[Rx]=deflection(x,Rs,Rm);
+printf('\nValue of Rx that will 100 percent deflection = %.2f k ohm\n',Rx/1000) \ No newline at end of file