Skip to content

Instantly share code, notes, and snippets.

@resure
Created November 23, 2012 07:11
Show Gist options
  • Save resure/4d6a64f8a4b0df9d7b0a to your computer and use it in GitHub Desktop.
Save resure/4d6a64f8a4b0df9d7b0a to your computer and use it in GitHub Desktop.
ОТУ ДЗ №1
a1 = 2.893;
a2 = 0.483;
a3 = 0.797;
a4 = 0.04;
system = tf(1, [1 a1 a2 a3 a4]);
figure;
nyquist(system);
figure;
margin(system);
figure;
step(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