summaryrefslogtreecommitdiff
path: root/3793/CH14/EX14.3
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3793/CH14/EX14.3
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 '3793/CH14/EX14.3')
-rw-r--r--3793/CH14/EX14.3/exp_14_3.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/3793/CH14/EX14.3/exp_14_3.sce b/3793/CH14/EX14.3/exp_14_3.sce
new file mode 100644
index 000000000..73322be44
--- /dev/null
+++ b/3793/CH14/EX14.3/exp_14_3.sce
@@ -0,0 +1,31 @@
+clear;
+clc;
+z1=2.00;
+z2=(-.250);
+z3=1.200;
+z4=11.00;
+z5=(-1.00);
+//z1,z2,z3 are currents and z4,z5 is voltage
+//if v2 is short circuited
+z11=(1/(2+(24/10)));
+z22=(6/10)*z11;
+z33=(4/10)*z11;
+z44=z33*6;
+z55=z22*4;
+//when v1 is short ckted;
+z2a=(1/(4+(12/8)));
+z1a=(6/8)*z2a;
+z3a=(2/8)*z2a;
+z4v=z3a*6;
+z5v=z2a*4;
+H=[z11 -z22; -z22 z2a; z33 z3a; z55 z4v; -z55 z5v];
+H1=[H]';
+W=[100 0 0 0 0; 0 100 0 0 0; 0 0 75 0 0; 0 0 0 75 0; 0 0 0 0 75;]
+G=H1*W*H;
+R=[.0100 0 0 0 0; 0 .0100 0 0 0; 0 0 .0133 0 0; 0 0 0 .0133 0; 0 0 0 0 .0133];
+F=H*inv(G)*(H')*inv(R);
+Rtemp=[diag(F)];
+fun=(1-F(1,1))+(1-F(2,2))+(1-F(3,3))+(1-F(4,4))+(1-F(5,5));
+mprintf("Performance function is %3.f",fun);
+
+