summaryrefslogtreecommitdiff
path: root/62/CH1/EX1.31/ex_1_31.sce
diff options
context:
space:
mode:
Diffstat (limited to '62/CH1/EX1.31/ex_1_31.sce')
-rwxr-xr-x62/CH1/EX1.31/ex_1_31.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/62/CH1/EX1.31/ex_1_31.sce b/62/CH1/EX1.31/ex_1_31.sce
new file mode 100755
index 000000000..e98937720
--- /dev/null
+++ b/62/CH1/EX1.31/ex_1_31.sce
@@ -0,0 +1,31 @@
+clear;
+close;
+clc;
+t=-10:0.1:10;
+a=2;
+//x(t)=u(t)-u(t-a)
+x=[zeros(1,find(t==0)-1) ones(1,find(t==a)-find(t==0)+1) zeros(1,length(t)-find(t==a))];
+subplot(2,1,1)
+plot(t,x)
+xtitle('x(t)','t')
+subplot(2,1,2)
+plot2d3(t(1:$-1),diff(x))
+xtitle('diff(x(t))','t')
+//x(t)=t*(u(t)-u(t-a))
+xb=t.*x;
+figure
+subplot(2,1,1)
+plot(t,xb)
+xtitle('x(t)','t')
+subplot(2,1,2)
+plot2d(t(1:$-1),diff(xb))
+xtitle('diff(x(t))','t')
+//x(t)=sgn(t)
+x=[-ones(1,find(t==0)-1) ones(1,length(t)-find(t==0)+1)];
+figure
+subplot(2,1,1)
+plot(t,x)
+xtitle('x(t)','t')
+subplot(2,1,2)
+plot2d(t(1:$-1),diff(x))
+xtitle('diff(x(t))','t') \ No newline at end of file