Created
March 2, 2013 05:56
-
-
Save anonymous/5069874 to your computer and use it in GitHub Desktop.
script for matlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1 = 6.82; | |
a2 = 4.93; | |
a3 = -6.515; | |
a4 = -5.382; | |
system = tf(1, [1 a1 a2 a3 a4]); | |
figure; | |
nyquist(system); | |
figure; | |
bode(system); | |
figure; | |
impulse(system); | |
figure | |
Re = []; | |
Im = []; | |
for w=0:0.01:1.1 | |
Njw = ((w*i)^4) + a1*((w*i)^3) + a2*((w*i)^2) + a3*(w*i) + a4; | |
Re1 = real(Njw); | |
Im1 = imag(Njw); | |
Re = [Re,Re1]; | |
Im = [Im,Im1]; | |
end | |
ax = axes; | |
plot(Re, Im); | |
set(ax, 'XGrid', 'on', 'YGrid', 'on'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment