summaryrefslogtreecommitdiff
path: root/692/CH2/EX2.22/P2_22.sce
diff options
context:
space:
mode:
Diffstat (limited to '692/CH2/EX2.22/P2_22.sce')
-rwxr-xr-x692/CH2/EX2.22/P2_22.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/692/CH2/EX2.22/P2_22.sce b/692/CH2/EX2.22/P2_22.sce
new file mode 100755
index 000000000..035d20a81
--- /dev/null
+++ b/692/CH2/EX2.22/P2_22.sce
@@ -0,0 +1,25 @@
+//EXAMPLE 2.22,impulse response of accumulator
+
+clear;
+clc;
+d=[1];
+t=-1:.01:1;
+h=0;
+clf();
+figure(0);
+a=gca();
+a.x_location="origin";
+
+for i=1:length(t)
+ if t(i)<0
+ h=0;
+ else
+ h=d;
+ plot2d3(i-101,h)
+ plot(i-101,h,'.r')
+ xtitle('Impulse Response of accumulator','t','Y');
+ a.children.children.thickness=1;
+ a.children.children.foreground=2;
+ end
+end
+disp(h,'The impulse response of Accumulator is =')