summaryrefslogtreecommitdiff
path: root/1340/CH4/EX4.1/4_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1340/CH4/EX4.1/4_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 '1340/CH4/EX4.1/4_1.sce')
-rwxr-xr-x1340/CH4/EX4.1/4_1.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/1340/CH4/EX4.1/4_1.sce b/1340/CH4/EX4.1/4_1.sce
new file mode 100755
index 000000000..61cfa6c8e
--- /dev/null
+++ b/1340/CH4/EX4.1/4_1.sce
@@ -0,0 +1,18 @@
+clc;
+s = %s;
+num = poly([-3],'s','roots');
+den = poly([-2 -4 -5],'s','roots');
+G = num/den;
+disp(G,"G(s)=");
+disp(laplace(1,t,s),"input is a step function:");
+syms t ;
+printf("C(s)=G(s)*R(s)=");
+K = G/s;
+C = syslin('c',K);
+disp(C);
+[A] = pfss(C);l=0;disp(A);
+for k = 1:size(A)
+ F(k)= ilaplace(A(k),s,t);
+ l = l+F(k);
+end
+disp(l,"c(t)="); \ No newline at end of file