diff options
author | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
commit | f35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch) | |
tree | eb72842d800ac1233e9d890e020eac5fd41b0b1b /22/CH4/EX4.27/ch4ex27.sce | |
parent | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff) | |
download | Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2 Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip |
updated the code
Diffstat (limited to '22/CH4/EX4.27/ch4ex27.sce')
-rwxr-xr-x | 22/CH4/EX4.27/ch4ex27.sce | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/22/CH4/EX4.27/ch4ex27.sce b/22/CH4/EX4.27/ch4ex27.sce index 0389caa79..85993f0a8 100755 --- a/22/CH4/EX4.27/ch4ex27.sce +++ b/22/CH4/EX4.27/ch4ex27.sce @@ -1,10 +1,11 @@ -omega_0=2*%pi*60; theta = [60 80 87]*(%pi/180);
-omega = (0:0.5:1000)'; mag = zeros(3,length(omega));
-s=poly(0,'s')
-for m =1:length(theta)
- H=syslin('c',((s^2+omega_0^2)/(s^2+2*omega_0*cos(theta(m))*s +omega_0^2)));
- bode(H,10,100);
-end
-f=omega/((2*%pi))plot(f,mag(1,:),'k-',f mag(2,:),'k--',f,mag(3,:),'k-.');
-xlabel('f[hz]'); ylabel('|H(j2/pi f)|');
-legend('\theta=60^\circ','\theta = 80^\circ','\theta = 87^\circ',0)
\ No newline at end of file +omega_0=2*%pi*60; theta = [60 80 87]*(%pi/180); +omega = (0:0.5:1000)'; mag = zeros(3,length(omega)); +s=poly(0,'s') +for m =1:length(theta) + H=syslin('c',((s^2+omega_0^2)/(s^2+2*omega_0*cos(theta(m))*s +omega_0^2))); + bode(H,10,100); +end +f=omega/((2*%pi)); +plot(f,mag(1,:)','k-',f,mag(2,:)','k--',f,mag(3,:)','k-.'); +xlabel('f[hz]'); ylabel('|H(j2/pi f)|'); +legend('\theta=60^\circ','\theta = 80^\circ','\theta = 87^\circ',1)
\ No newline at end of file |