summaryrefslogtreecommitdiff
path: root/2279/CH1/EX1.4
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /2279/CH1/EX1.4
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 '2279/CH1/EX1.4')
-rw-r--r--2279/CH1/EX1.4/Ex1_4.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/2279/CH1/EX1.4/Ex1_4.sce b/2279/CH1/EX1.4/Ex1_4.sce
new file mode 100644
index 000000000..1f689f557
--- /dev/null
+++ b/2279/CH1/EX1.4/Ex1_4.sce
@@ -0,0 +1,29 @@
+clear
+clf
+clc
+t=-20:0.01:20;
+for i=1:length(t)
+ if t(i)>0 then
+ x1(i)=0.5;
+ else
+ x1(i)=-0.5;
+ end
+end
+subplot(3,1,1)
+plot(t,x1);
+xtitle("x1(t)=-0.5 for t<0 and x1(t)=0.5 for t>0","time","amplitude");
+xgrid(5);
+subplot(3,1,2)
+for i=1:length(t)
+ x2(i)=-t(i);
+end
+plot(t,x2);
+xtitle("x2(t)=-t for all t","time","amplitude");
+xgrid(5);
+subplot(3,1,3)
+for i=1:length(t)
+ x3(i)=t(i).^2;
+end
+plot(t,x3);
+xtitle("x3(t)=t^2 for all t","time","amplitude");
+xgrid(5);