summaryrefslogtreecommitdiff
path: root/1202/CH17/EX17.3/17_3.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1202/CH17/EX17.3/17_3.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 '1202/CH17/EX17.3/17_3.sce')
-rwxr-xr-x1202/CH17/EX17.3/17_3.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/1202/CH17/EX17.3/17_3.sce b/1202/CH17/EX17.3/17_3.sce
new file mode 100755
index 000000000..c7806e51d
--- /dev/null
+++ b/1202/CH17/EX17.3/17_3.sce
@@ -0,0 +1,20 @@
+clear
+clc
+
+//Example 17.3
+disp('Example 17.3')
+
+z=%z;
+Gz=(-0.3225*z^-2+0.5712*z^-3)/(1-0.9744*z^-1+0.2231*z^-2);
+G=tf2ss(Gz)
+n=10;
+u=ones(1,n);
+y=dsimul(G,u);
+disp(y','y=')
+
+mprintf('\n\nAlternatively the simulation can also be done\n...
+using syslin(d,Gz) and flts(u,Gz)\n\n')
+
+Gz2=syslin('d',Gz);
+y2=flts(u,Gz2)
+disp(y2','y2=')