diff options
Diffstat (limited to '52/CH1/EX1.32.a/Example1_32_a.sce')
-rwxr-xr-x | 52/CH1/EX1.32.a/Example1_32_a.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/52/CH1/EX1.32.a/Example1_32_a.sce b/52/CH1/EX1.32.a/Example1_32_a.sce new file mode 100755 index 000000000..bb85f818b --- /dev/null +++ b/52/CH1/EX1.32.a/Example1_32_a.sce @@ -0,0 +1,25 @@ +//Example 1.32
+//Program to Plot Magnitude and Phase Responce
+clear;
+clc ;
+close ;
+w=-%pi:0.01:%pi;
+H=1+2*cos(w)+2*cos(2*w);
+//caluculation of Phase and Magnitude of H
+[phase_H,m]=phasemag(H);
+Hm=abs(H);
+a=gca();
+subplot(2,1,1);
+a.y_location="origin";
+plot2d(w/%pi,Hm);
+xlabel('Frequency in Radians')
+ylabel('abs(Hm)');
+title('MAGNITUDE RESPONSE');
+subplot(2,1,2);
+a=gca();
+a.x_location="origin";
+a.y_location="origin";
+plot2d(w/(2*%pi),phase_H);
+xlabel('Frequency in Radians');
+ylabel('<(H)');
+title('PHASE RESPONSE');
\ No newline at end of file |