summaryrefslogtreecommitdiff
path: root/1076/CH4/EX4.2/4_2.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1076/CH4/EX4.2/4_2.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1076/CH4/EX4.2/4_2.sce')
-rwxr-xr-x1076/CH4/EX4.2/4_2.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/1076/CH4/EX4.2/4_2.sce b/1076/CH4/EX4.2/4_2.sce
new file mode 100755
index 000000000..c123e1326
--- /dev/null
+++ b/1076/CH4/EX4.2/4_2.sce
@@ -0,0 +1,23 @@
+clear
+clc
+
+c1=.15
+c2=.05
+V=100
+
+A=[
+1+c1 -(1+c2) -c2
+c1 1+c1 -(1+c2)
+1 0 0
+]
+
+B=[0 0 1]'
+Vm=inv(A) * B
+Vm = round(Vm*1e4)/1e4
+V1=V/(Vm(1)+Vm(2)+Vm(3))
+V2=Vm(2) * V1
+V3=Vm(3) * V1
+
+ef=V/(3*V3)
+
+mprintf("Voltage distribution in percentage of total voltage:\nV1=%.2f\tV2=%.2f\tV3=%.2f\nstring efficiency=%.1f percent",V1, V2, V3,ef*100)