diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /182/CH3/EX3.3/example3_3.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '182/CH3/EX3.3/example3_3.sce')
-rwxr-xr-x | 182/CH3/EX3.3/example3_3.sce | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/182/CH3/EX3.3/example3_3.sce b/182/CH3/EX3.3/example3_3.sce new file mode 100755 index 000000000..3a84519b6 --- /dev/null +++ b/182/CH3/EX3.3/example3_3.sce @@ -0,0 +1,20 @@ + +//example 3-3 in page 41 +clc; +//Given Data +A=['a' 'b' 'c']; +m=0; +Rm=99;//coil resistance in ohm +IM=0.1e-3;//FSD(IM)=0.1 mA +Rs=1;//shunt resistance in ohm +//calculation +n=2;//initialisation +while n>0.25, + n=n/2; + Im=IM*n; + Vm=Im*Rm;// Meter voltage in volts + Is=Vm/Rs;//current throught the shunt resistance in ampere + I=Im+Is;//toatal current through the ammeter I=Im+Is in ampere + m=m+1; + printf("(%c) current through the ammeter at %.2f FSD=%.1f mA\n",A(m),n,I*1000); +end |