diff options
Diffstat (limited to '67/CH2/EX2.59')
-rwxr-xr-x | 67/CH2/EX2.59/example259.sce | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/67/CH2/EX2.59/example259.sce b/67/CH2/EX2.59/example259.sce new file mode 100755 index 000000000..2661f9b75 --- /dev/null +++ b/67/CH2/EX2.59/example259.sce @@ -0,0 +1,32 @@ +//Example 2.59
+clc;
+n=-8:1:8;
+for i=1:length(n)
+ if n(i)<0 then
+ x(i)=0;
+ h(i)=0;
+ else
+ x(i)=1;
+ h(i)=2^n(i);
+ end
+end
+y=convol(x,h);
+figure
+a=gca();
+plot2d3(n,h);
+a.x_location='origin';
+a.y_location='origin';
+title('Impulse responce');
+figure
+a=gca();
+plot2d3(n,x);
+a.x_location='origin';
+a.y_location='origin';
+title('Input signal');
+figure
+a=gca();
+n1=-16:1:16
+plot2d3(n1,y);
+a.x_location='origin';
+a.y_location='origin';
+title('Output signal');
\ No newline at end of file |