summaryrefslogtreecommitdiff
path: root/45/CH11/EX11.1/example_11_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /45/CH11/EX11.1/example_11_1.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 '45/CH11/EX11.1/example_11_1.sce')
-rwxr-xr-x45/CH11/EX11.1/example_11_1.sce34
1 files changed, 34 insertions, 0 deletions
diff --git a/45/CH11/EX11.1/example_11_1.sce b/45/CH11/EX11.1/example_11_1.sce
new file mode 100755
index 000000000..252cd799c
--- /dev/null
+++ b/45/CH11/EX11.1/example_11_1.sce
@@ -0,0 +1,34 @@
+//example 11.1
+clc;
+//this program requires
+//kmap3a.sci to find the kmap
+//noof.sci function used inside kmap
+//noof0.sci function used inside kmap
+n= [ 0 0 0;
+ 0 0 1;
+ 0 1 0;
+ 0 1 1;
+ 1 0 0;
+ 1 0 1;
+ 1 1 0;
+ 1 1 1];
+ for i= 1:8 //printing the state synthesis table
+ an1(i,1)=n(i,3);
+ dn(i,1)=n(i,3);
+ if n(i,1)==1 & n(i,2) ==1 & n(i,3)==0 then
+ z(i,1)=1;
+ else
+ z(i,1)=0;
+ end
+end;
+dis=[n an1 dn z];
+disp('State Synthesis table :');
+disp(' An X Y An1 Dn Z');
+disp(dis);
+printf('\n\n Design equations :\n');
+Dn = [ 0 1 1 0;0 1 1 0];
+Z= [ 0 0 0 0;0 0 0 1];
+dn1= kmap3a(Dn); // finding the 3 varible kmap of Dn
+printf('\n Dn = %s \n\n',dn1); //displaying the minimized expression
+z1= kmap3a(Z); //finding the 3 variable kmap of Z
+printf('\n Z = %s \n\n',z1); //displaying the minimized expression