summaryrefslogtreecommitdiff
path: root/4/DEPENDENCIES/Frequency_response.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /4/DEPENDENCIES/Frequency_response.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '4/DEPENDENCIES/Frequency_response.sce')
-rwxr-xr-x4/DEPENDENCIES/Frequency_response.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/4/DEPENDENCIES/Frequency_response.sce b/4/DEPENDENCIES/Frequency_response.sce
new file mode 100755
index 000000000..1082e2363
--- /dev/null
+++ b/4/DEPENDENCIES/Frequency_response.sce
@@ -0,0 +1,19 @@
+clear;
+close;
+clc;
+W = -%pi:(1/500):%pi;
+z = exp(sqrt(-1)*W);
+H = z./(z-0.8);
+Mag_H = abs(H);
+[Phase_H,m] = phasemag(H);
+//phasemag used to calculate phase and magnitude in dB
+subplot(2,1,1)
+plot2d(W,Mag_H)
+xlabel('Frequency in Radians')
+ylabel('abs(H)')
+title('Magnitude Response')
+subplot(2,1,2)
+plot2d(W,Phase_H)
+xlabel('Frequency in Radians')
+ylabel('<(H)')
+title('Phase Response') \ No newline at end of file